From: codybuell Date: Wed, 17 Jan 2018 20:10:11 +0000 (-0500) Subject: Correct escaping X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/f55ee792293300d488cea6eb214550763b47b7cd?hp=--cc Correct escaping --- f55ee792293300d488cea6eb214550763b47b7cd diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 067643d..be62835 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -602,12 +602,12 @@ if !exists('*s:EditUrlUnderCursor') if get(g:, 'vim_markdown_no_extensions_in_markdown', 0) " use another file extension if preferred if exists('g:vim_markdown_auto_extension_ext') - let l:url = '.'.g:vim_markdown_auto_extension_ext + let l:ext = '.'.g:vim_markdown_auto_extension_ext else - let l:url = '.md' + let l:ext = '.md' endif endif - let l:url = fnamemodify(expand('%:h').'/'.l:url, ':.') + let l:url = fnameescape(fnamemodify(expand('%:h').'/'.l:url.l:ext, ':.')) execute 'edit' l:url endif if l:anchor != ''