Skip to content

Commit

Permalink
feat: syntax highlight for svelte code block in mdx (#2381)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlyu123 authored May 23, 2024
1 parent cf00f03 commit 6e57bce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions packages/svelte-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-vscode/syntaxes/markdown-svelte.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 6e57bce

Please sign in to comment.