From 63b07dbd7fe51b4612cac7224d9ffb6149024d4d Mon Sep 17 00:00:00 2001 From: robincaloudis <53619127+robincaloudis@users.noreply.github.com> Date: Wed, 1 Feb 2023 15:44:37 +0100 Subject: [PATCH] Fix wrong language scope in markdown inline math expression (#172957) Let 3rd matching group be an end Previously, the first and third group was defined as beginning. This is not true as the first group of the regular expression is the beginning of the math inline markdown expression and the third group the _end_. Once the third group is correctly assigned, its language scope can be changed accordingly. --- extensions/markdown-math/package.json | 3 ++- .../markdown-math/syntaxes/md-math-inline.tmLanguage.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/markdown-math/package.json b/extensions/markdown-math/package.json index e7a9ebc105f..077c90d9686 100644 --- a/extensions/markdown-math/package.json +++ b/extensions/markdown-math/package.json @@ -52,7 +52,8 @@ "text.html.markdown" ], "embeddedLanguages": { - "meta.embedded.math.markdown": "latex" + "meta.embedded.math.markdown": "latex", + "punctuation.definition.math.end.markdown": "latex" } } ], diff --git a/extensions/markdown-math/syntaxes/md-math-inline.tmLanguage.json b/extensions/markdown-math/syntaxes/md-math-inline.tmLanguage.json index a5e38e6fd94..02fe2236653 100644 --- a/extensions/markdown-math/syntaxes/md-math-inline.tmLanguage.json +++ b/extensions/markdown-math/syntaxes/md-math-inline.tmLanguage.json @@ -29,7 +29,7 @@ ] }, "3": { - "name": "punctuation.definition.math.begin.markdown" + "name": "punctuation.definition.math.end.markdown" } } }, @@ -49,7 +49,7 @@ ] }, "3": { - "name": "punctuation.definition.math.begin.markdown" + "name": "punctuation.definition.math.end.markdown" } } },