From b41a604a71bfa1d3e832b67c211f7c356d530ee6 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Mon, 6 Oct 2014 12:27:28 +0200 Subject: [PATCH] Fix () [] were rendered as links when not in link --- syntax/mkd.vim | 2 +- test/syntax.vader | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/syntax/mkd.vim b/syntax/mkd.vim index a4c7af4..011f95e 100644 --- a/syntax/mkd.vim +++ b/syntax/mkd.vim @@ -105,7 +105,7 @@ if get(g:, 'vim_markdown_frontmatter', 0) syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^---$" contains=@yamlTop endif -syn cluster mkdNonListItem contains=htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdID,mkdURL,mkdInlineURL,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdIndentCode,mkdListItem,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,mkdMath +syn cluster mkdNonListItem contains=htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdInlineURL,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdIndentCode,mkdListItem,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,mkdMath "highlighting for Markdown groups HtmlHiLink mkdString String diff --git a/test/syntax.vader b/test/syntax.vader index 0305120..b06ddf0 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -26,8 +26,11 @@ Execute (link with title): Given mkd; (a) +(b) + Execute (parenthesis not in link): - AssertNotEqual SyntaxOf('a'), 'mkdLink' + AssertNotEqual SyntaxOf('a'), 'mkdURL' + AssertNotEqual SyntaxOf('b'), 'mkdURL' Given mkd; [a](b) c [d](e) -- 2.39.5