Feature: Config: Normalize link so that user can choose [[]] or []() (Issue #892)

Main change:
        Create function: normalize_syntax_settings(syntax)

Problem:
        Some user prefer [[]] links more than []().
        As vimwiki know both of them, they should be able to choose
        without regex mastery and with tests

Solution:
        let g:vimwiki_syntax_variables.markdown.Link1 = vimwiki#vars#get_global('WikiLinkTemplate1')
This commit is contained in:
Tinmarino
2020-07-26 22:14:00 -04:00
parent 4672deb44e
commit d9d14cc3f7
5 changed files with 53 additions and 17 deletions

View File

@ -360,7 +360,7 @@ function! vimwiki#tags#generate_tags(create, ...) abort
let link_tpl = vimwiki#vars#get_syntaxlocal('Weblink3Template')
let link_infos = vimwiki#base#resolve_link(taglink)
if empty(link_infos.anchor)
let link_tpl = vimwiki#vars#get_syntaxlocal('Weblink1Template')
let link_tpl = vimwiki#vars#get_syntaxlocal('Link1')
let entry = s:safesubstitute(link_tpl, '__LinkUrl__', taglink, '')
let entry = s:safesubstitute(entry, '__LinkDescription__', taglink, '')
else