vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit 1cffbdbf3d668518a8af2dcbff681f77977a0b83
parent 28675698ad2e4114d93f3cda86535ea31f175a4d
Author: EinfachToll <istjanichtzufassen@googlemail.com>
Date:   Fri, 25 Jan 2019 16:45:11 +0100

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.

Diffstat:
Mautoload/vimwiki/base.vim | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim @@ -1856,15 +1856,14 @@ function! vimwiki#base#table_of_contents(create) let indentstring = repeat(' ', vimwiki#u#sw()) let bullet = vimwiki#lst#default_symbol().' ' 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' let link_tpl = vimwiki#vars#get_syntaxlocal('Weblink1Template') + else + let link_tpl = vimwiki#vars#get_global('WikiLinkTemplate2') endif let link = s:safesubstitute(link_tpl, '__LinkUrl__', - \ '#'.esc_link, '') - let link = s:safesubstitute(link, '__LinkDescription__', esc_desc, '') + \ '#'.link, '') + let link = s:safesubstitute(link, '__LinkDescription__', desc, '') call add(lines, startindent.repeat(indentstring, lvl-1).bullet.link) endfor