From 72d95536ed7f22725c4f70a471ce56376130d186 Mon Sep 17 00:00:00 2001 From: user202729 <25191436+user202729@users.noreply.github.com> Date: Sun, 5 Sep 2021 08:35:46 +0700 Subject: [PATCH] Syntax highlighting for ```{=language} ... ``` code blocks --- syntax/pandoc.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/pandoc.vim b/syntax/pandoc.vim index 58e0a6a..cffc4cf 100644 --- a/syntax/pandoc.vim +++ b/syntax/pandoc.vim @@ -170,7 +170,7 @@ function! EnableEmbedsforCodeblocksWithLang(entry) let s:langsyntaxfile = matchstr(a:entry, '[^=]*$') unlet! b:current_syntax exe 'syn include @'.toupper(s:langname).' syntax/'.s:langsyntaxfile.'.vim' - exe 'syn region pandocDelimitedCodeBlock_' . s:langname . ' start=/\(\_^\([ ]\{4,}\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s:langname . '\>.*\n\)\@<=\_^/' . + exe 'syn region pandocDelimitedCodeBlock_' . s:langname . ' start=/\(\_^\([ ]\{4,}\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*[.=]\)\=' . s:langname . '\>.*\n\)\@<=\_^/' . \' end=/\_$\n\(\([ ]\{4,}\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock' . \' contains=@' . toupper(s:langname) exe 'syn region pandocDelimitedCodeBlockinBlockQuote_' . s:langname . ' start=/>\s\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s:langname . '\>/' .