Escape the 'dot' in extension substitution

This escapes the `.` preceding an extension (e.g. `.wiki`) so that it doesn't accidentally match any character.

For example: `[vimwiki](vimwiki)` was opening the `vi.wiki` page, because of this rule.
This commit is contained in:
Drew Hays authored and Michael F. Schönitzer committed 2017-11-03 23:06:10 +01:00
1 parent bc6acf5103
commit eed4ceff1a
1 file changed
+1 -1
+1 -1
View File
@@ -1273,7 +1273,7 @@ function! vimwiki#base#follow_link(split, reuse, move_cursor, ...) "{{{
" remove the extension from the filename if exists, because non-vimwiki " remove the extension from the filename if exists, because non-vimwiki
" markdown files usually include the extension in links " markdown files usually include the extension in links
let lnk = substitute(lnk, VimwikiGet('ext').'$', '', '') let lnk = substitute(lnk, '\'.VimwikiGet('ext').'$', '', '')
endif endif
let current_tab_page = tabpagenr() let current_tab_page = tabpagenr()