From 7aa19c24ef1f442d770d17dc9d762ce6f8e7efd3 Mon Sep 17 00:00:00 2001 From: Chris Chambers Date: Sun, 11 Sep 2011 21:59:19 +0800 Subject: [PATCH 1/4] Added support for ~~~ styled code blocks --- syntax/markdown.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 0d82e237..4df9c09e 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -70,6 +70,7 @@ syntax match mkdBlockCode /^\s*\n\(^\(\s\{4}\|\t\).*\n\)\+/ syntax match mkdListCode /^\s*\n\(^\(\s\{8}\|\t{2}\).*\n\)\+/ syntax match mkdLineBreak / \+$/ syntax region mkdCode start=/\\\@/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell syntax region mkdCode start="]*>" end="" From f4d5c795c663ef8890f04796442dc363fa6f248b Mon Sep 17 00:00:00 2001 From: Chris Chambers Date: Sun, 11 Sep 2011 22:02:43 +0800 Subject: [PATCH 2/4] Removing the highlighting on <>& The html syntax that this inherits from highlights unmatched triangle braces (<>) and also & as errors. (& should be &) They are however escaped by markdown so this stops tham form showing. --- syntax/markdown.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 4df9c09e..7504e665 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -35,6 +35,8 @@ syntax spell toplevel syntax case ignore syntax sync linebreaks=1 +syntax clear htmlError + " Additions to HTML groups syntax region htmlBold start=/\\\@ Date: Sun, 25 Sep 2011 00:30:18 -0500 Subject: [PATCH 3/4] Fixed mkdLink to allow newlines between the two groups. Fixes highlighting around line 70 of the Markdown index page source. (http://daringfireball.net/projects/markdown/index.text) --- syntax/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 0d82e237..75d0fdfa 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -44,7 +44,7 @@ syntax region htmlItalic start=/\\\@ Date: Tue, 18 Oct 2011 17:11:12 -0400 Subject: [PATCH 4/4] Add GitHub Flavored Markdown code blocks. This code comes from https://gist.github.com/1034258. --- syntax/markdown.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 0d82e237..946099f4 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -69,6 +69,7 @@ syntax match mkdListItem /^\s*\d\+\.\s\+.*\n\(\(^.\+\n\)*\n\?\)\(\(^\(\s\{4}\| syntax match mkdBlockCode /^\s*\n\(^\(\s\{4}\|\t\).*\n\)\+/ syntax match mkdListCode /^\s*\n\(^\(\s\{8}\|\t{2}\).*\n\)\+/ syntax match mkdLineBreak / \+$/ +syntax region mkdCode start=/^``[^`]*/ end=/[^`]*``.*/ syntax region mkdCode start=/\\\@/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell