Cherry-pick the changes from dev -- part6

This commit is contained in:
EinfachToll
2018-02-17 21:30:01 +01:00
parent f60993249a
commit 4c940cd5bb
4 changed files with 47 additions and 11 deletions

View File

@ -1129,7 +1129,7 @@ function! vimwiki#base#follow_link(split, reuse, move_cursor, ...) "{{{
" remove the extension from the filename if exists, because non-vimwiki
" markdown files usually include the extension in links
let lnk = substitute(lnk, vimwiki#vars#get_wikilocal('ext').'$', '', '')
let lnk = substitute(lnk, '\'.vimwiki#vars#get_wikilocal('ext').'$', '', '')
endif
let current_tab_page = tabpagenr()

View File

@ -65,7 +65,7 @@ fun! s:read_captions(files) "{{{
let rx_header = vimwiki#vars#get_syntaxlocal('rxHeader')
for fl in a:files
" remove paths and extensions
let fl_key = fnamemodify(fl, ':t:r')
let fl_key = substitute(fnamemodify(fl, ':t'), vimwiki#vars#get_wikilocal('ext').'$', '', '')
if filereadable(fl)
for line in readfile(fl, '', s:vimwiki_max_scan_for_caption)