From: Hiroshi Shirosaki Date: Tue, 22 Dec 2015 07:37:21 +0000 (+0900) Subject: Drop highlight setting of mkdMath X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/deafb5766fcc2d0686020a98854df2239102986f?ds=inline;hp=-c Drop highlight setting of mkdMath We use highlight setting of tex.vim. `SyntaxOf()` doesn't return transparent syntax name. Instead we use `texStatement`. Fix #234 --- deafb5766fcc2d0686020a98854df2239102986f diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 9041ab1..92ff871 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -128,7 +128,6 @@ HtmlHiLink mkdID Identifier HtmlHiLink mkdLinkDef mkdID HtmlHiLink mkdLinkDefTarget mkdURL HtmlHiLink mkdLinkTitle htmlString -HtmlHiLink mkdMath Statement HtmlHiLink mkdDelimiter Delimiter let b:current_syntax = "mkd" diff --git a/test/syntax.vader b/test/syntax.vader index 6ad8907..0b2c860 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -199,15 +199,17 @@ Execute (multiline math): Given markdown; $ \sqrt{a}{b} $ -$$ \sqrt{a}{b} $$ +$$ \frac{a}{b} $$ Execute (math tex highlighting): let g:vim_markdown_math=0 syn off | syn on - AssertNotEqual SyntaxOf('a'), 'texMatcher' + AssertNotEqual SyntaxOf('sqrt'), 'texStatement' + AssertNotEqual SyntaxOf('frac'), 'texStatement' let g:vim_markdown_math=1 syn off | syn on - AssertEqual SyntaxOf('a'), 'texMatcher' + AssertEqual SyntaxOf('sqrt'), 'texStatement' + AssertEqual SyntaxOf('frac'), 'texStatement' # YAML frontmatter