Highlight math not using TeX but TeX math

Fix #236
This commit is contained in:
EinfachToll 2016-11-24 16:46:56 +01:00
parent 2c9df65644
commit 0966031234

View File

@ -1079,6 +1079,14 @@ function! vimwiki#base#nested_syntax(filetype, start, end, textSnipHl) abort "{{
else else
unlet b:current_syntax unlet b:current_syntax
endif endif
" Fix issue #236: tell Vimwiki to think in maths when encountering maths
" blocks like {{$ }}$. Here, we don't want the tex highlight group, but the
" group for tex math.
if a:textSnipHl ==# 'VimwikiMath'
let group='texMathZoneGroup'
endif
execute 'syntax region textSnip'.ft. execute 'syntax region textSnip'.ft.
\ ' matchgroup='.a:textSnipHl. \ ' matchgroup='.a:textSnipHl.
\ ' start="'.a:start.'" end="'.a:end.'"'. \ ' start="'.a:start.'" end="'.a:end.'"'.