mirror of
https://github.com/tpope/vim-markdown.git
synced 2025-11-08 18:03:48 -05:00
Allow colons after language identifiers in fenced code blocks
This commit is contained in:
@@ -131,8 +131,8 @@ for s:type in g:markdown_fenced_languages
|
|||||||
if has_key(s:done_include, matchstr(s:type,'[^.]*'))
|
if has_key(s:done_include, matchstr(s:type,'[^.]*'))
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(`\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
|
exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(`\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=[^[:space:]:]\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
|
||||||
exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(\~\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=\S\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
|
exe 'syn region markdownHighlight_'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*\z(\~\{3,\}\)\s*\%({.\{-}\.\)\='.matchstr(s:type,'[^=]*').'}\=[^[:space:]:]\@!.*$" end="^\s*\z1\ze\s*$" keepend contains=@markdownHighlight_'.tr(matchstr(s:type,'[^=]*$'),'.','_') . s:concealends
|
||||||
let s:done_include[matchstr(s:type,'[^.]*')] = 1
|
let s:done_include[matchstr(s:type,'[^.]*')] = 1
|
||||||
endfor
|
endfor
|
||||||
unlet! s:type
|
unlet! s:type
|
||||||
|
|||||||
Reference in New Issue
Block a user