From b4a095bcffe0b8cd4149bddacfeb86e346f94159 Mon Sep 17 00:00:00 2001 From: "Lyu, Wei Da" Date: Thu, 23 May 2024 10:54:34 +0800 Subject: [PATCH] feat: syntax highlight for svelte code block in mdx --- 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"