diff --git a/syntax/markdown.vim b/syntax/markdown.vim index a36e7e82..e19adda1 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -156,7 +156,7 @@ if get(g:, 'vim_markdown_strikethrough', 0) HtmlHiLink mkdStrike htmlStrike endif -syn cluster mkdHeadingContent contains=htmlItalic,htmlBold,htmlBoldItalic,mkdLink,mkdInlineURL +syn cluster mkdHeadingContent contains=htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdLink,mkdInlineURL syn cluster mkdNonListItem contains=@htmlTop,htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdInlineURL,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,mkdMath,mkdStrike "highlighting for Markdown groups diff --git a/test/syntax.vader b/test/syntax.vader index 3f21cce7..b111de0d 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -1494,3 +1494,35 @@ Given markdown; Execute (asterisk bold italic text in setext headings): AssertEqual SyntaxOf('h1'), 'htmlBoldItalic' AssertEqual SyntaxOf('h2'), 'htmlBoldItalic' + +Given markdown; +# [^h1] + +## [^h2] + +### [^h3] + +#### [^h4] + +##### [^h5] + +###### [^h6] + +Execute (footnotes in atx headings): + AssertEqual SyntaxOf('h1'), 'mkdFootnotes' + AssertEqual SyntaxOf('h2'), 'mkdFootnotes' + AssertEqual SyntaxOf('h3'), 'mkdFootnotes' + AssertEqual SyntaxOf('h4'), 'mkdFootnotes' + AssertEqual SyntaxOf('h5'), 'mkdFootnotes' + AssertEqual SyntaxOf('h6'), 'mkdFootnotes' + +Given markdown; +[^h1] += + +[^h2] +- + +Execute (footnotes in setext headings): + AssertEqual SyntaxOf('h1'), 'mkdFootnotes' + AssertEqual SyntaxOf('h2'), 'mkdFootnotes'