X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/69c9e5001983d808be2259cd493b99d51ad5d7d3..5d98d6b22bd9848748ec9fd7780d056ff63c2ddd:/syntax/markdown.vim diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 63429b3..778e818 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -34,19 +34,26 @@ syn spell toplevel syn case ignore syn sync linebreaks=1 +let s:conceal = '' +let s:concealends = '' +if has('conceal') + let s:conceal = ' conceal' + let s:concealends = ' concealends' +endif + "additions to HTML groups -syn region htmlItalic start="\\\@ ]*>\)\@=" end=">" +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 @@ -77,9 +84,8 @@ syn match htmlH1 /^.\+\n=\+$/ contains=@Spell syn match htmlH2 /^.\+\n-\+$/ contains=@Spell "define Markdown groups -syn match mkdLineContinue ".$" contained syn match mkdLineBreak / \+$/ -syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,mkdLineContinue,@Spell +syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLineBreak,@Spell syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@]*>" end="" syn region mkdCode start="]*>" end="" syn region mkdFootnote start="\[^" end="\]" syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/ +syn match mkdCode /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained -syn region mkdListItemLine matchgroup=mkdListItem start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" contains=@mkdNonListItem,@Spell +syn match mkdListItem /^\s*\%([-*+]\|\d\+\.\)\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}-$/ @@ -110,7 +118,7 @@ if get(g:, 'vim_markdown_math', 0) syn region mkdMath matchgroup=mkdDelimiter start="\\\@