From: Hiroshi Shirosaki Date: Sat, 9 Jan 2016 05:08:09 +0000 (+0900) Subject: Fix indent code block and add tests X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/917624e16c47de87c2adcacd08bc9472f718ec12?ds=inline Fix indent code block and add tests `mkdIndentCode` is renamed to `mkdCode` because there is no need to distinguish them. We fixed a bug that indent code block at the start of a file is not highlighted. --- diff --git a/syntax/markdown.vim b/syntax/markdown.vim index fc036c6..035199b 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -79,9 +79,9 @@ syn region mkdCode start="]*>" end="" syn region mkdCode start="]*>" end="" syn region mkdFootnote start="\[^" end="\]" syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/ -syn match mkdIndentCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained +syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained syn region mkdListItemLine matchgroup=mkdListItem start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" contains=@mkdNonListItem,@Spell -syn region mkdNonListItemBlock start="\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem,@Spell +syn region mkdNonListItemBlock start="\(\%^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@!\|\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!\)" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem,@Spell 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}_$/ @@ -110,12 +110,11 @@ if get(g:, 'vim_markdown_math', 0) syn region mkdMath matchgroup=mkdDelimiter start="\\\@