From 7ec58485d1cd1d976e901819080ff078d90f4b77 Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Thu, 14 Jan 2016 17:55:13 +0900 Subject: [PATCH 1/1] Fix code block syntax of longer backticks, tildes --- syntax/markdown.vim | 4 ++-- test/syntax.vader | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) 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 -- 2.39.5