Skip to content

Commit e51c1ec

Browse files
committed
first draft, incorrect
1 parent ff52ed9 commit e51c1ec

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/pandoc-syntax.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ CONFIGURATION *vim-pandoc-syntax-configuration*
3838
- ellipses
3939
- quotes
4040
- inlinecode
41+
- inlinemath
4142

4243
To review what are the rules for, look for the call to |s:WithConceal| in
4344
syntax/pandoc.vim that takes the corresponding rulename as first argument.

syntax/pandoc.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ 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-
syn region pandocLaTeXInlineMath start=/\v\\@<!\$\S@=/ end=/\v\\@<!\$\d@!/ keepend contains=@LATEX
265-
syn region pandocLaTeXInlineMath start=/\\\@<!\\(/ end=/\\\@<!\\)/ keepend contains=@LATEX
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
266268
syn match pandocEscapedDollar /\\\$/ conceal cchar=$
267269
syn match pandocProtectedFromInlineLaTeX /\\\@<!\${.*}\(\(\s\|[[:punct:]]\)\([^$]*\|.*\(\\\$.*\)\{2}\)\n\n\|$\)\@=/ display
268270
" contains=@LATEX

0 commit comments

Comments
 (0)