From: Ben Williams Date: Fri, 16 Nov 2012 18:20:50 +0000 (-0500) Subject: Reorder groups so horizontal rules work and don't get preempted by list items. X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/51643fcee7d6863950114eae435e92ca2e654f3b Reorder groups so horizontal rules work and don't get preempted by list items. --- diff --git a/syntax/mkd.vim b/syntax/mkd.vim index eae0a33..2926194 100644 --- a/syntax/mkd.vim +++ b/syntax/mkd.vim @@ -60,21 +60,21 @@ syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained "define Markdown groups syn match mkdLineContinue ".$" contained -syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/ -syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-$/ -syn match mkdRule /^\s+_\s\{0,1}_\s\{0,1}_$/ -syn match mkdRule /^\s*-\{3,}$/ -syn match mkdRule /^\s*\*\{3,5}$/ -syn match mkdListItem "^\s*[-*+]\s\+" -syn match mkdListItem "^\s*\d\+\.\s\+" -syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ -syn match mkdLineBreak / \+$/ -syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell -syn region mkdCode start="]*>" end="" -syn region mkdCode start="]*>" end="" +syn match mkdLineBreak / \+$/ +syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell +syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@]*>" end="" +syn region mkdCode start="]*>" end="" +syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ +syn match mkdListItem "^\s*[-*+]\s\+" +syn match mkdListItem "^\s*\d\+\.\s\+" +syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/ +syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-$/ +syn match mkdRule /^\s+_\s\{0,1}_\s\{0,1}_$/ +syn match mkdRule /^\s*-\{3,}$/ +syn match mkdRule /^\s*\*\{3,5}$/ "HTML headings syn region htmlH1 start="^\s*#" end="\($\|#\+\)" contains=@Spell