X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/642730fccce7e78c995389f3c430747d266efa96..b8f5e31cc406a811b24d9d45db5ebf220ab4735b:/syntax/markdown.vim?ds=inline diff --git a/syntax/markdown.vim b/syntax/markdown.vim index bacb5a1..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="\\\@