From: Hiroshi Shirosaki Date: Thu, 14 Jan 2016 08:55:13 +0000 (+0900) Subject: Fix code block syntax of longer backticks, tildes X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/7ec58485d1cd1d976e901819080ff078d90f4b77?ds=inline;hp=--cc Fix code block syntax of longer backticks, tildes --- 7ec58485d1cd1d976e901819080ff078d90f4b77 diff --git a/syntax/markdown.vim b/syntax/markdown.vim index e28644a..7e06471 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -72,9 +72,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 105e595..ebd197e 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -167,6 +167,22 @@ code Execute (code blocks can be fenced with tildes): AssertEqual SyntaxOf('c'), 'mkdCode' +Given markdown; +~~~~ +code +~~~~~ + +Execute (code blocks can be fenced with tildes longer than 3): + AssertEqual SyntaxOf('c'), 'mkdCode' + +Given markdown; +```` +code +````` + +Execute (code blocks can be fenced with backticks longer than 3): + AssertEqual SyntaxOf('c'), 'mkdCode' + Given markdown; ~~~ruby code