From 6e57bcef67d5d94c194a4eeaf4acd7fdd60b02fb Mon Sep 17 00:00:00 2001 From: "Lyu, Wei-Da" <36730922+jasonlyu123@users.noreply.github.com> Date: Thu, 23 May 2024 11:18:45 +0800 Subject: [PATCH] feat: syntax highlight for svelte code block in mdx (#2381) --- packages/svelte-vscode/package.json | 9 ++++++--- packages/svelte-vscode/syntaxes/markdown-svelte.json | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/svelte-vscode/package.json b/packages/svelte-vscode/package.json index b143bb636..29fb94977 100644 --- a/packages/svelte-vscode/package.json +++ b/packages/svelte-vscode/package.json @@ -492,7 +492,8 @@ "scopeName": "markdown.svelte.codeblock", "path": "./syntaxes/markdown-svelte.json", "injectTo": [ - "text.html.markdown" + "text.html.markdown", + "source.mdx" ], "embeddedLanguages": { "meta.embedded.block.svelte": "svelte" @@ -502,14 +503,16 @@ "scopeName": "markdown.svelte.codeblock.script", "path": "./syntaxes/markdown-svelte-js.json", "injectTo": [ - "text.html.markdown" + "text.html.markdown", + "source.mdx" ] }, { "scopeName": "markdown.svelte.codeblock.style", "path": "./syntaxes/markdown-svelte-css.json", "injectTo": [ - "text.html.markdown" + "text.html.markdown", + "source.mdx" ] }, { diff --git a/packages/svelte-vscode/syntaxes/markdown-svelte.json b/packages/svelte-vscode/syntaxes/markdown-svelte.json index 308715f12..b766b7f08 100644 --- a/packages/svelte-vscode/syntaxes/markdown-svelte.json +++ b/packages/svelte-vscode/syntaxes/markdown-svelte.json @@ -1,7 +1,7 @@ { "scopeName": "markdown.svelte.codeblock", "fileTypes": [], - "injectionSelector": "L:text.html.markdown", + "injectionSelector": "L:text.html.markdown, L:source.mdx", "patterns": [ { "include": "#svelte-code-block"