Wiki links starting with / are always relative to the wiki root

Also, links with the file: scheme are absolute iff they start with / or
drive letter

Ref #105
This commit is contained in:
EinfachToll
2015-03-13 16:31:15 +01:00
parent 8d7d568214
commit 6922836a0c
4 changed files with 160 additions and 104 deletions

View File

@ -49,10 +49,7 @@ endfunction "}}}
function! vimwiki#path#is_link_to_dir(link) "{{{
" Check if link is to a directory.
" It should be ended with \ or /.
if a:link =~# '.\+[/\\]$'
return 1
endif
return 0
return a:link =~# '\m[/\\]$'
endfunction "}}}
function! vimwiki#path#abs_path_of_link(link) "{{{