From 55b49cad42efc450415880215c2922c643162356 Mon Sep 17 00:00:00 2001 From: Andrew Radev Date: Mon, 24 Jun 2013 11:00:29 +0200 Subject: [PATCH] Allow spaces after ``` With a fenced code block with a language, it's legal to put spaces between the fence and the language name. --- syntax/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 76c077c..3024f2f 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -86,7 +86,7 @@ syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end= if main_syntax ==# 'markdown' for s:type in g:markdown_fenced_languages - exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') + exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') endfor unlet! s:type endif