Test for links_space_char #1132
This commit is contained in:
@@ -2739,11 +2739,14 @@ function! s:normalize_link_syntax_v() abort
|
||||
" Replace file extension
|
||||
let file_extension = vimwiki#vars#get_wikilocal('ext', vimwiki#vars#get_bufferlocal('wiki_nr'))
|
||||
let link = s:safesubstitute(link, '__FileExtension__', file_extension , '')
|
||||
|
||||
" Replace space characters
|
||||
let sc = vimwiki#vars#get_wikilocal('links_space_char')
|
||||
let link = substitute(link, '\s', sc, 'g')
|
||||
|
||||
" Replace description (used for markdown)
|
||||
let link = s:safesubstitute(link, '__LinkDescription__', visual_selection, '')
|
||||
|
||||
" Remove newlines
|
||||
let link = substitute(link, '\n', '', '')
|
||||
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
# Test variable management (should be small)
|
||||
|
||||
Given vimwiki (abc def ghi jkl #1132):
|
||||
abc def ghi jkl
|
||||
|
||||
Do (vee<CR>):
|
||||
:call SetSyntax('markdown')\<CR>
|
||||
:call vimwiki#vars#set_wikilocal('links_space_char', '_')\<CR>
|
||||
vee\<CR>
|
||||
|
||||
Expect (underscores in link url not in description):
|
||||
[abc def](abc_def) ghi jkl
|
||||
|
||||
Execute (restore):
|
||||
call vimwiki#vars#set_wikilocal('links_space_char', ' ')
|
||||
|
||||
# Issue #980
|
||||
#
|
||||
# brennen commenting these out 2021-03-29 per @tinmarino:
|
||||
|
||||
Reference in New Issue
Block a user