From: Shane Pearman Date: Fri, 30 Jun 2017 00:19:54 +0000 (-0700) Subject: Change mkdRule match syntax to be more liberal X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/c6d7597da30f776206b64d6bbd98cdf914c090b2?ds=sidebyside;hp=-c Change mkdRule match syntax to be more liberal Consider any line beginning with 3 or more of '*', '-', or '_' with possible spaces before and between, possibly followed by zero or more of the previously matched symbols or spaces to be a horizontal rule. --- c6d7597da30f776206b64d6bbd98cdf914c090b2 diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 43cb898..008a6d8 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -108,11 +108,9 @@ syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ containe syn match mkdListItem /^\s*\%([-*+]\|\d\+\.\)\ze\s\+/ contained syn region mkdListItemLine start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" oneline contains=@mkdNonListItem,mkdListItem,@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}_$/ -syn match mkdRule /^\s*-\{3,}$/ -syn match mkdRule /^\s*\*\{3,5}$/ +syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*\(\*\|\s\)*$/ +syn match mkdRule /^\s*-\s\{0,1}-\s\{0,1}-\(-\|\s\)*$/ +syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_\(_\|\s\)*$/ " YAML frontmatter if get(g:, 'vim_markdown_frontmatter', 0)