From: Ciro Santilli Date: Mon, 6 Oct 2014 10:27:28 +0000 (+0200) Subject: Fix () [] were rendered as links when not in link X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/b41a604a71bfa1d3e832b67c211f7c356d530ee6?ds=inline;hp=c4282db6cc2c536cc83c8b803b065c4440aecbc2 Fix () [] were rendered as links when not in link --- 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)