Run :syn case match before :syn include

Syntax scripts for html and some other languages run :syn case ignore.
This may break syntax scripts of other fenced languages that implicitly
assume :syn case match.
This commit is contained in:
Jaehwang Jerry Jung
2022-01-09 23:37:35 +09:00
committed by Tim Pope
parent 23213f39db
commit e2acae8cef

View File

@@ -31,6 +31,7 @@ for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
if s:type =~ '\.' if s:type =~ '\.'
let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*') let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
endif endif
syn case match
exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim' exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
unlet! b:current_syntax unlet! b:current_syntax
let s:done_include[matchstr(s:type,'[^.]*')] = 1 let s:done_include[matchstr(s:type,'[^.]*')] = 1