Fix: Typeface: var_with_undersore triggered syntax italic

This commit is contained in:
Tinmarino 2020-08-03 01:00:14 -04:00
parent 22bb7d9570
commit fb178f8e3c
3 changed files with 5 additions and 1 deletions

View File

@ -292,4 +292,8 @@ function! vimwiki#u#hi_typeface(dic) abort
" -- Italic 3
call vimwiki#u#hi_tag(u[0], u[1], 'VimwikiItalicBoldUnderline', '', 2)
endfor
" Prevent var_with_underscore to trigger italic text
" -- See $VIMRUNTIME/syntax/markdown.vim
syn match VimwikiError "\w\@<=_\w\@="
endfunction

View File

@ -339,6 +339,7 @@ let s:syntax_dic = vimwiki#vars#get_syntaxlocal('dTypeface')
call vimwiki#u#hi_typeface(s:syntax_dic)
hi def link VimwikiMarkers Normal
hi def link VimwikiError Normal
hi def link VimwikiEqIn Number
hi def link VimwikiEqInT VimwikiEqIn

View File

@ -42,7 +42,6 @@ let s:markdown_syntax.dTypeface['bold_italic'] = [
\ ['\S\@<=___\|___\S\@=', '\S\@<=___\|___\S\@='],
\ ]
" text: $ equation_inline $
let s:markdown_syntax.rxEqIn = '\$[^$`]\+\$'
let s:markdown_syntax.char_eqin = '\$'