From 21e569b97085441b54e44b7bb221a04948cd975e Mon Sep 17 00:00:00 2001 From: Josh Holland Date: Tue, 23 Oct 2018 22:10:01 +0100 Subject: [PATCH] Fix detection of YAML frontmatter ending with "..." PR #374 introduced a bug which would cause any line containing exactly three characters to be highlighted as the end of a YAML frontmatter block; this commit fixes that, so that only three dots will end the block. --- syntax/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 0bffaa2..5056af4 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -115,7 +115,7 @@ syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_\(_\|\s\)*$/ " YAML frontmatter if get(g:, 'vim_markdown_frontmatter', 0) syn include @yamlTop syntax/yaml.vim - syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^\(---\|...\)$" contains=@yamlTop keepend + syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^\(---\|\.\.\.\)$" contains=@yamlTop keepend unlet! b:current_syntax endif -- 2.39.5