Fix: Don't double a ' character in header in TOC
When building the TOC, every ' in a header got doubled. According to git blame, I did this doubling explicitely, but I have no idea why I did this.
This commit is contained in:
parent
28675698ad
commit
1cffbdbf3d
@ -1856,15 +1856,14 @@ function! vimwiki#base#table_of_contents(create)
|
|||||||
let indentstring = repeat(' ', vimwiki#u#sw())
|
let indentstring = repeat(' ', vimwiki#u#sw())
|
||||||
let bullet = vimwiki#lst#default_symbol().' '
|
let bullet = vimwiki#lst#default_symbol().' '
|
||||||
for [lvl, link, desc] in complete_header_infos
|
for [lvl, link, desc] in complete_header_infos
|
||||||
let esc_link = substitute(link, "'", "''", 'g')
|
|
||||||
let esc_desc = substitute(desc, "'", "''", 'g')
|
|
||||||
let link_tpl = vimwiki#vars#get_global('WikiLinkTemplate2')
|
|
||||||
if vimwiki#vars#get_wikilocal('syntax') == 'markdown'
|
if vimwiki#vars#get_wikilocal('syntax') == 'markdown'
|
||||||
let link_tpl = vimwiki#vars#get_syntaxlocal('Weblink1Template')
|
let link_tpl = vimwiki#vars#get_syntaxlocal('Weblink1Template')
|
||||||
|
else
|
||||||
|
let link_tpl = vimwiki#vars#get_global('WikiLinkTemplate2')
|
||||||
endif
|
endif
|
||||||
let link = s:safesubstitute(link_tpl, '__LinkUrl__',
|
let link = s:safesubstitute(link_tpl, '__LinkUrl__',
|
||||||
\ '#'.esc_link, '')
|
\ '#'.link, '')
|
||||||
let link = s:safesubstitute(link, '__LinkDescription__', esc_desc, '')
|
let link = s:safesubstitute(link, '__LinkDescription__', desc, '')
|
||||||
call add(lines, startindent.repeat(indentstring, lvl-1).bullet.link)
|
call add(lines, startindent.repeat(indentstring, lvl-1).bullet.link)
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user