Allow spaces after ```

With a fenced code block with a language, it's legal to put spaces
between the fence and the language name.
This commit is contained in:
Andrew Radev
2013-06-24 11:00:29 +02:00
parent 451eefb9b2
commit 55b49cad42

View File

@@ -86,7 +86,7 @@ syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end=
if main_syntax ==# 'markdown' if main_syntax ==# 'markdown'
for s:type in g:markdown_fenced_languages 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 endfor
unlet! s:type unlet! s:type
endif endif