From 2d8b60487ac84aeda257ef54a39fe68d3ce433a6 Mon Sep 17 00:00:00 2001 From: takenoko Date: Sat, 21 Apr 2018 23:43:36 +0900 Subject: [PATCH] Add syntaxes fenced TeX with dollar --- syntax/markdown.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 44187ff..e9df8d0 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -144,6 +144,14 @@ if get(b:, 'markdown_yaml_head', get(g:, 'markdown_yaml_head', main_syntax ==# ' syn region markdownYamlHead start="\%^---$" end="^\%(---\|\.\.\.\)\s*$" keepend contains=@markdownYamlTop,@Spell endif +if g:markdown_fenced_tex + syn include syntax/tex.vim + syn region markdownHighlighttex matchgroup=markdownCodeDelimiter start="\\\\(\ze[^ \n]" end="[^ \n]\zs\\\\)" keepend contains=@texMathZoneGroup + syn region markdownHighlighttex matchgroup=markdownCodeDelimiter start="\\\\\[" end="\\\\\]" keepend contains=@texMathZoneGroup + syn region markdownHighlighttex matchgroup=markdownCodeDelimiter start="\$\ze[^ \n]" end="[^ \n]\zs\$" keepend contains=@texMathZoneGroup + syn region markdownHighlighttex matchgroup=markdownCodeDelimiter start="\$\$" end="\$\$" keepend contains=@texMathZoneGroup +endif + syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]" syn match markdownError "\w\@<=_\w\@="