diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2018-10-08 19:00:59 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2018-10-08 19:00:59 +0200 |
commit | fd74d8b2b170b540680a9bbf6c64990f8ebafd08 (patch) | |
tree | b1fdef6203a78a21053d1b8e0666ab7a38c36df2 /syntax/markdown.vim | |
parent | 055f7710b65dfa2df52fc0b5be2486ae36ac5751 (diff) | |
download | vim-polyglot-3.3.3.tar.gz vim-polyglot-3.3.3.zip |
Updatev3.3.3
Diffstat (limited to 'syntax/markdown.vim')
-rw-r--r-- | syntax/markdown.vim | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 79af3af7..43c12f79 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -84,25 +84,25 @@ syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained "HTML headings -syn region htmlH1 start="^\s*#" end="$" contains=mkdLink,mkdInlineURL,@Spell -syn region htmlH2 start="^\s*##" end="$" contains=mkdLink,mkdInlineURL,@Spell -syn region htmlH3 start="^\s*###" end="$" contains=mkdLink,mkdInlineURL,@Spell -syn region htmlH4 start="^\s*####" end="$" contains=mkdLink,mkdInlineURL,@Spell -syn region htmlH5 start="^\s*#####" end="$" contains=mkdLink,mkdInlineURL,@Spell -syn region htmlH6 start="^\s*######" end="$" contains=mkdLink,mkdInlineURL,@Spell +syn region htmlH1 matchgroup=mkdHeading start="^\s*#" end="$" contains=mkdLink,mkdInlineURL,@Spell +syn region htmlH2 matchgroup=mkdHeading start="^\s*##" end="$" contains=mkdLink,mkdInlineURL,@Spell +syn region htmlH3 matchgroup=mkdHeading start="^\s*###" end="$" contains=mkdLink,mkdInlineURL,@Spell +syn region htmlH4 matchgroup=mkdHeading start="^\s*####" end="$" contains=mkdLink,mkdInlineURL,@Spell +syn region htmlH5 matchgroup=mkdHeading start="^\s*#####" end="$" contains=mkdLink,mkdInlineURL,@Spell +syn region htmlH6 matchgroup=mkdHeading start="^\s*######" end="$" contains=mkdLink,mkdInlineURL,@Spell syn match htmlH1 /^.\+\n=\+$/ contains=mkdLink,mkdInlineURL,@Spell syn match htmlH2 /^.\+\n-\+$/ contains=mkdLink,mkdInlineURL,@Spell "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=/\s*``[^`]*/ end=/[^`]*``\s*/ -syn region mkdCode start=/^\s*\z(`\{3,}\)[^`]*$/ end=/^\s*\z1`*\s*$/ -syn region mkdCode start=/\s*\~\~[^\~]*/ end=/[^\~]*\~\~\s*/ -syn region mkdCode start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/ end=/^\s*\z1\~*\s*$/ -syn region mkdCode start="<pre[^>]*\\\@<!>" end="</pre>" -syn region mkdCode start="<code[^>]*\\\@<!>" end="</code>" +execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!`/ end=/\(\([^\\]\|^\)\\\)\@<!`/' . s:concealends +execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!``/ skip=/[^`]`[^`]/ end=/\(\([^\\]\|^\)\\\)\@<!``/' . s:concealends +execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(`\{3,}\)[^`]*$/ end=/^\s*\z1`*\s*$/' . s:concealends +execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!\~\~/ end=/\(\([^\\]\|^\)\\\)\@<!\~\~/' . s:concealends +execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/ end=/^\s*\z1\~*\s*$/' . s:concealends +execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<pre[^>]*\\\@<!>" end="</pre>"' . s:concealends +execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<code[^>]*\\\@<!>" end="</code>"' . 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\)\+/ @@ -117,7 +117,7 @@ syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_\(_\|\s\)*$/ " 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 @@ -152,6 +152,7 @@ syn cluster mkdNonListItem contains=@htmlTop,htmlItalic,htmlBold,htmlBoldItalic, "highlighting for Markdown groups HtmlHiLink mkdString String HtmlHiLink mkdCode String +HtmlHiLink mkdCodeDelimiter String HtmlHiLink mkdCodeStart String HtmlHiLink mkdCodeEnd String HtmlHiLink mkdFootnote Comment |