From: Hiroshi Shirosaki Date: Thu, 26 Jul 2018 05:07:43 +0000 (+0900) Subject: Merge pull request #377 from mmFooD/code-conceal X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/3b87f963c524e58a1ae8dfdf46f21075b1394bfb?hp=-c Merge pull request #377 from mmFooD/code-conceal Added concealends for code items --- 3b87f963c524e58a1ae8dfdf46f21075b1394bfb diff --combined syntax/markdown.vim index c8b8faf,fbf082e..566407f --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@@ -94,13 -94,13 +94,13 @@@ syn match htmlH2 /^.\+\n-\+$/ co "define Markdown groups syn match mkdLineBreak / \+$/ syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLink,mkdInlineURL,mkdLineBreak,@Spell - syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@]*\\\@" end="" - syn region mkdCode start="]*\\\@" end="" + execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@]*\\\@" end=""' . s:concealends + execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="]*\\\@" end=""' . s:concealends syn region mkdFootnote start="\[^" end="\]" syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/ syn match mkdCode /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ @@@ -115,7 -115,7 +115,7 @@@ syn match mkdRule /^\s*_\s\{0, " YAML frontmatter if get(g:, 'vim_markdown_frontmatter', 0) syn include @yamlTop syntax/yaml.vim - syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^---$" contains=@yamlTop keepend + syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^\(---\|...\)$" contains=@yamlTop keepend unlet! b:current_syntax endif @@@ -150,6 -150,7 +150,7 @@@ syn cluster mkdNonListItem contains=@ht "highlighting for Markdown groups HtmlHiLink mkdString String HtmlHiLink mkdCode String + HtmlHiLink mkdCodeDelimiter String HtmlHiLink mkdCodeStart String HtmlHiLink mkdCodeEnd String HtmlHiLink mkdFootnote Comment