From deafb5766fcc2d0686020a98854df2239102986f Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Tue, 22 Dec 2015 16:37:21 +0900 Subject: [PATCH 1/1] 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 --- syntax/markdown.vim | 1 - test/syntax.vader | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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 -- 2.39.5