Solved some minor issues
This commit is contained in:
parent
e8ad164fb0
commit
ec4066ad83
@ -1724,18 +1724,20 @@ endfunction " }}}
|
|||||||
|
|
||||||
" s:normalize_link_in_diary
|
" s:normalize_link_in_diary
|
||||||
function! s:normalize_link_in_diary(lnk) " {{{
|
function! s:normalize_link_in_diary(lnk) " {{{
|
||||||
|
let link_path = fnamemodify(a:lnk . VimwikiGet('ext'), ':p')
|
||||||
" Check if link already exists or is a date
|
if filereadable(link_path) || a:lnk =~# '\d\d\d\d-\d\d-\d\d'
|
||||||
if filereadable(a:lnk . '.wiki') || a:lnk =~# '\d\d\d\d-\d\d-\d\d'
|
let rxUrl = g:vimwiki_rxWord
|
||||||
let sub = vimwiki#base#normalize_link_helper(a:lnk,
|
let rxDesc = ''
|
||||||
\ g:vimwiki_rxWord, '',
|
let template = g:vimwiki_WikiLinkTemplate1
|
||||||
\ g:vimwiki_WikiLinkTemplate1)
|
|
||||||
else
|
else
|
||||||
let depth = len(split(VimwikiGet('diary_rel_path'), '/'))
|
let depth = len(split(VimwikiGet('diary_rel_path'), '/'))
|
||||||
let sub = '[[' . repeat('../', depth) . a:lnk . '|' . a:lnk . ']]'
|
let str = repeat('../', depth) . a:lnk . '¦¦' . a:lnk
|
||||||
|
let rxUrl = '^.*\ze¦¦'
|
||||||
|
let rxDesc = '¦¦\zs.*$'
|
||||||
|
let template = g:vimwiki_WikiLinkTemplate2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return sub
|
return vimwiki#base#normalize_link_helper(str, rxUrl, rxDesc, template)
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
|
|
||||||
" s:normalize_link_syntax_n
|
" s:normalize_link_syntax_n
|
||||||
|
Loading…
Reference in New Issue
Block a user