diff --git a/grammars/textmate/python-markdown/scripts/grammar/tokenizer.ts b/grammars/textmate/python-markdown/scripts/grammar/tokenizer.ts index cf5fcc4..c0990e2 100644 --- a/grammars/textmate/python-markdown/scripts/grammar/tokenizer.ts +++ b/grammars/textmate/python-markdown/scripts/grammar/tokenizer.ts @@ -175,8 +175,8 @@ function getEmbeddedGrammar( if (scope === "source.yaml") { return getYamlGrammar(); } - if (scope === "text.tex.latex") { - return { name: "Test LaTeX", scopeName: scope, patterns: [] }; + if (scope === "text.html.markdown.math") { + return { name: "Test Markdown Math", scopeName: scope, patterns: [] }; } // Return a minimal grammar for every embedded language scope diff --git a/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml b/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml index fd8d017..74bad72 100644 --- a/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml +++ b/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml @@ -48,7 +48,6 @@ repository: flow: patterns: - - include: "#escape" - include: "#table" - include: "#admonition" - include: "#details" @@ -377,25 +376,25 @@ repository: math: patterns: - name: markup.math.block.markdown - begin: (?:^|\G)(\$\$) + begin: (?:^|\G)[ \t]*(\$\$)[ \t]*$ beginCaptures: 1: { name: punctuation.definition.math.begin.markdown } - contentName: meta.embedded.block.latex - end: (\$\$)([ \t]*)(\r?\n|\r)? + contentName: meta.embedded.math.markdown + end: (?:^|\G)[ \t]*(\$\$)([ \t]*)(\r?\n|\r)? endCaptures: 1: { name: punctuation.definition.math.end.markdown } patterns: - - include: text.tex.latex + - include: text.html.markdown.math - name: markup.math.block.markdown - begin: (?:^|\G)(\\\[) + begin: (?:^|\G)[ \t]*(\\\[)[ \t]*$ beginCaptures: 1: { name: punctuation.definition.math.begin.markdown } - contentName: meta.embedded.block.latex - end: (\\\])([ \t]*)(\r?\n|\r)? + contentName: meta.embedded.math.markdown + end: (?:^|\G)[ \t]*(\\\])([ \t]*)(\r?\n|\r)? endCaptures: 1: { name: punctuation.definition.math.end.markdown } patterns: - - include: text.tex.latex + - include: text.html.markdown.math fenced_code: patterns: @@ -654,25 +653,25 @@ repository: inline_math: patterns: - name: markup.math.inline.markdown - begin: (\$)(?=[^\s$]) + begin: (?