vimwiki

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

commit 35af13c1efaba318f02812f2b9098a591e7ec18a
parent f9b9b5a7687ff3754de32881e9c54672a7992810
Author: kaphula <vaaka@protonmail.com>
Date:   Mon, 20 Apr 2020 23:13:03 +0300

Moved safe_line_html call after the %plainhtml check so it does not convert essential html characters such as < and > to ampersand form.

Diffstat:
Mautoload/vimwiki/html.vim | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/autoload/vimwiki/html.vim b/autoload/vimwiki/html.vim @@ -1218,16 +1218,14 @@ function! s:parse_line(line, state) abort let state.header_ids = a:state.header_ids let res_lines = [] - - let line = s:safe_html_line(a:line) - let processed = 0 + let line = a:line if !processed " allows insertion of plain text to the final html conversion " for example: " %plainhtml <div class="mycustomdiv"> - " inserts that line to the final html file (without %plainhtml prefix) + " inserts the line above to the final html file (without %plainhtml prefix) let trigger = '%plainhtml' if line =~# '^\s*' . trigger let lines = [] @@ -1259,6 +1257,8 @@ function! s:parse_line(line, state) abort endif endif + let line = s:safe_html_line(a:line) + " pres if !processed let [processed, lines, state.pre] = s:process_tag_pre(line, state.pre)