From: Hiroshi Shirosaki Date: Wed, 23 Dec 2015 09:35:33 +0000 (+0900) Subject: Fix fenced code block highlight with c++ X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/fdf78014dbb9f1c701e538a0ea29f9c536c91448?ds=sidebyside;hp=-c Fix fenced code block highlight with c++ Add `+` to language characters. --- fdf78014dbb9f1c701e538a0ea29f9c536c91448 diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 92ff871..5ee9cc4 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -69,9 +69,9 @@ syn match mkdLineBreak / \+$/ syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@]*>" end="" syn region mkdCode start="]*>" end="" syn region mkdFootnote start="\[^" end="\]" diff --git a/test/syntax.vader b/test/syntax.vader index 0b2c860..8b9b21a 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -155,6 +155,17 @@ code Execute (code blocks can have a language specifier): AssertEqual SyntaxOf('c'), 'mkdCode' +Given markdown; +```c++ +code +``` + +text + +Execute (code blocks can be fenced with backticks and a language specifier): + AssertEqual SyntaxOf('code'), 'mkdCode' + AssertNotEqual SyntaxOf('text'), 'mkdCode' + # Math Given markdown;