fix(runtime): check markdownError before syn-clear (#16930)

Avoids `E28: No such highlight group name: markdownError` when using a
foreign markdown syntax.
This commit is contained in:
Frederick Zhang
2022-01-07 05:51:47 +11:00
committed by GitHub
parent 287d3566de
commit b435755452

View File

@@ -12,7 +12,9 @@ unlet! b:current_syntax
syn case match
" We do not care about markdown syntax errors
syn clear markdownError
if hlexists('markdownError')
syn clear markdownError
endif
syn keyword healthError ERROR[:] containedin=markdownCodeBlock,mkdListItemLine
syn keyword healthWarning WARNING[:] containedin=markdownCodeBlock,mkdListItemLine