mirror of
https://github.com/tpope/vim-markdown.git
synced 2025-11-13 12:23:48 -05:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user