runtime(doc): improve examples for netrw-handler functions

fixes: #16043

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2024-11-13 15:38:33 +01:00
parent 5ca8f223f0
commit 8b96858996

View File

@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 9.1. Last change: 2024 Nov 09 *pi_netrw.txt* For Vim version 9.1. Last change: 2024 Nov 12
------------------------------------------------ ------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell NETRW REFERENCE MANUAL by Charles E. Campbell
@ -1505,9 +1505,9 @@ For example, special handlers for links Markdown and HTML are
return matchstr(getline('.')[col('.')-1:], return matchstr(getline('.')[col('.')-1:],
\ '\[.\{-}\](\zs' .. g:netrw_regex_url .. '\ze\(\s\+.\{-}\)\?)') \ '\[.\{-}\](\zs' .. g:netrw_regex_url .. '\ze\(\s\+.\{-}\)\?)')
endif endif
return ''
finally finally
call winrestview(save_view) call winrestview(save_view)
return ''
endtry endtry
endfunction endfunction
@ -1520,9 +1520,9 @@ For example, special handlers for links Markdown and HTML are
return matchstr(getline('.')[col('.') - 1 : ], return matchstr(getline('.')[col('.') - 1 : ],
\ 'href=["'.."'"..']\?\zs\S\{-}\ze["'.."'"..']\?/\?>') \ 'href=["'.."'"..']\?\zs\S\{-}\ze["'.."'"..']\?/\?>')
endif endif
return ''
finally finally
call winrestview(save_view) call winrestview(save_view)
return ''
endtry endtry
endfunction endfunction
< <