X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/5ff124014066ba7882617c283e7750d449caafb4..b8f5e31cc406a811b24d9d45db5ebf220ab4735b:/syntax/markdown.vim?ds=inline diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 60a675d..e7b6e2e 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -36,7 +36,7 @@ syn sync linebreaks=1 "additions to HTML groups syn region htmlItalic start="\\\@ ]*>\)\@=" end=">" +execute 'syn region mkdInlineURL matchgroup=mkdDelimiter start="\\\@ ]*>\)\@=" end=">"' " Link definitions: [id]: URL (Optional Title) syn region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite @@ -69,9 +74,9 @@ syn match mkdLineBreak / \+$/ syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@]*>" end="" syn region mkdCode start="]*>" end="" syn region mkdFootnote start="\[^" end="\]" @@ -87,33 +92,34 @@ syn match mkdRule /^\s*-\{3,}$/ syn match mkdRule /^\s*\*\{3,5}$/ "HTML headings -syn region htmlH1 start="^\s*#" end="\($\|#\+\)" contains=@Spell -syn region htmlH2 start="^\s*##" end="\($\|#\+\)" contains=@Spell -syn region htmlH3 start="^\s*###" end="\($\|#\+\)" contains=@Spell -syn region htmlH4 start="^\s*####" end="\($\|#\+\)" contains=@Spell -syn region htmlH5 start="^\s*#####" end="\($\|#\+\)" contains=@Spell -syn region htmlH6 start="^\s*######" end="\($\|#\+\)" contains=@Spell +syn region htmlH1 start="^\s*#" end="$" contains=@Spell +syn region htmlH2 start="^\s*##" end="$" contains=@Spell +syn region htmlH3 start="^\s*###" end="$" contains=@Spell +syn region htmlH4 start="^\s*####" end="$" contains=@Spell +syn region htmlH5 start="^\s*#####" end="$" contains=@Spell +syn region htmlH6 start="^\s*######" end="$" contains=@Spell syn match htmlH1 /^.\+\n=\+$/ contains=@Spell syn match htmlH2 /^.\+\n-\+$/ contains=@Spell -if get(g:, 'vim_markdown_math', 0) - syn region mkdMath matchgroup=mkdDelimiter start="\\\@ - let b:current_syntax = "mkd" delcommand HtmlHiLink