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

@ -1,5 +1,30 @@
Include: vader_includes/vader_setup.vader
# Link Normalisation {{{1
# And configuration
# Issues: #892
####################
Execute (Log):
Log 'Markdown change Link1 : Pressing enter to create a [[double bracket]] #892'
Given vimwiki (abc def ghi jkl):
abc def ghi jkl
Execute (Set filename wiki_test.md):
call SetSyntax('markdown')
let save_link = g:vimwiki_syntax_variables.markdown.Link1
let g:vimwiki_syntax_variables.markdown.Link1 = vimwiki#vars#get_global('WikiLinkTemplate1')
Do (vee<CR>):
vee\<CR>
Expect (append md suffix):
[[abc def]] ghi jkl
Execute (restore):
let g:vimwiki_syntax_variables.markdown.Link1 = save_link
# vimwiki_markdown_link_ext {{{1
####################