vimwiki

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

commit f18bf3dafb0736c7986c4916f6f903ca24bab1a9
parent 348b01495797ee0e06f6548ef5754468c994b2d6
Author: Tinmarino <tinmarino@gmail.com>
Date:   Fri,  7 Aug 2020 10:52:12 -0400

Fix: Html convertion regex Bold and Italic (Issue #977)

Problem: I copied rxBold from markdown (mea culpa)
Solution: Use the one that was defined in default

Diffstat:
Mautoload/vimwiki/html.vim | 27+++++++--------------------
1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/autoload/vimwiki/html.vim b/autoload/vimwiki/html.vim @@ -11,32 +11,19 @@ let g:loaded_vimwiki_html_auto = 1 " FIXME: Magics: Why not use the current syntax highlight " This is due to historical copy paste and lazyness of markdown user -" text: **strong** or __strong__ +" text: *strong* +" let s:default_syntax.rxBold = '\*[^*]\+\*' let s:rxBold = '\%(^\|\s\|[[:punct:]]\)\@<='. - \'\(\*\|_\)\{2\}'. - \'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'. - \'\1\{2\}'. + \'\*'. + \'\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)'. + \'\*'. \'\%([[:punct:]]\|\s\|$\)\@=' " text: _emphasis_ or *emphasis* let s:rxItalic = '\%(^\|\s\|[[:punct:]]\)\@<='. - \'\(\*\|_\)'. - \'\%([^*_`[:space:]][^*_`]*[^*_`[:space:]]\|[^*_`[:space:]]\)'. - \'\1'. - \'\%([[:punct:]]\|\s\|$\)\@=' - -" Fixme: and those ? are they converted ? -" text: *_bold italic_* or _*italic bold*_ -let rxBoldItalic = '\%(^\|\s\|[[:punct:]]\)\@<='. - \'\(\*\)\{3\}'. - \'\%([^*`[:space:]][^*`]*[^*`[:space:]]\|[^*`[:space:]]\)'. - \'\1\{3\}'. - \'\%([[:punct:]]\|\s\|$\)\@=' - -let rxItalicBold = '\%(^\|\s\|[[:punct:]]\)\@<='. - \'\(_\)\{3\}'. + \'_'. \'\%([^_`[:space:]][^_`]*[^_`[:space:]]\|[^_`[:space:]]\)'. - \'\1\{3\}'. + \'_'. \'\%([[:punct:]]\|\s\|$\)\@='