From c36500ea4739f9bb2422fac35e2b8ded0e0c6d7d Mon Sep 17 00:00:00 2001 From: Benjamin Esham Date: Mon, 5 Sep 2011 21:59:53 -0500 Subject: [PATCH] Fix incorrect treatment of backticks with only one character enclosed Markdown treats spans as code if they are enclosed within single backticks (e.g. `foo`). The regular expression used to detect these had a corner case which would be triggered if there was only one character in backticks (`a`): Vim would not see the the second backtick, and the syntax region would not be properly closed. The solution was to make one of the regular expression atoms zero-width. --- syntax/markdown.vim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index b79de52b..aca7cf6b 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -36,12 +36,11 @@ syntax case ignore syntax sync linebreaks=1 " Additions to HTML groups -syntax region htmlBold start=/\\\@/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell syntax region mkdCode start="]*>" end=""