Skip to content

Commit 6e57bce

Browse files
authored
feat: syntax highlight for svelte code block in mdx (#2381)
1 parent cf00f03 commit 6e57bce

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/svelte-vscode/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,8 @@
492492
"scopeName": "markdown.svelte.codeblock",
493493
"path": "./syntaxes/markdown-svelte.json",
494494
"injectTo": [
495-
"text.html.markdown"
495+
"text.html.markdown",
496+
"source.mdx"
496497
],
497498
"embeddedLanguages": {
498499
"meta.embedded.block.svelte": "svelte"
@@ -502,14 +503,16 @@
502503
"scopeName": "markdown.svelte.codeblock.script",
503504
"path": "./syntaxes/markdown-svelte-js.json",
504505
"injectTo": [
505-
"text.html.markdown"
506+
"text.html.markdown",
507+
"source.mdx"
506508
]
507509
},
508510
{
509511
"scopeName": "markdown.svelte.codeblock.style",
510512
"path": "./syntaxes/markdown-svelte-css.json",
511513
"injectTo": [
512-
"text.html.markdown"
514+
"text.html.markdown",
515+
"source.mdx"
513516
]
514517
},
515518
{

packages/svelte-vscode/syntaxes/markdown-svelte.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scopeName": "markdown.svelte.codeblock",
33
"fileTypes": [],
4-
"injectionSelector": "L:text.html.markdown",
4+
"injectionSelector": "L:text.html.markdown, L:source.mdx",
55
"patterns": [
66
{
77
"include": "#svelte-code-block"

0 commit comments

Comments
 (0)