Skip to content

Commit 41d5ba7

Browse files
committed
try to use WithConceal
1 parent e51c1ec commit 41d5ba7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

syntax/pandoc.vim

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,8 @@ call s:WithConceal('html_c_e', 'syn match pandocHTMLCommentEnd /-->/ contained',
261261
" Unset current_syntax so the 2nd include will work
262262
unlet b:current_syntax
263263
syn include @LATEX syntax/tex.vim
264-
if index(g:pandoc#syntax#conceal#blacklist, 'inlinemath') == -1
265-
syn region pandocLaTeXInlineMath start=/\v\\@<!\$\S@=/ end=/\v\\@<!\$\d@!/ keepend contains=@LATEX
266-
syn region pandocLaTeXInlineMath start=/\\\@<!\\(/ end=/\\\@<!\\)/ keepend contains=@LATEX
267-
endif
264+
call s:WithConceal('inlinemath', 'syn region pandocLaTeXInlineMath start=/\v\\@<!\$\S@=/ end=/\v\\@<!\$\d@!/ keepend contains=@LATEX', 'conceal')
265+
call s:WithConceal('inlinemath', 'syn region pandocLaTeXInlineMath start=/\\\@<!\\(/ end=/\\\@<!\\)/ keepend contains=@LATEX ', 'conceal')
268266
syn match pandocEscapedDollar /\\\$/ conceal cchar=$
269267
syn match pandocProtectedFromInlineLaTeX /\\\@<!\${.*}\(\(\s\|[[:punct:]]\)\([^$]*\|.*\(\\\$.*\)\{2}\)\n\n\|$\)\@=/ display
270268
" contains=@LATEX

0 commit comments

Comments
 (0)