sebsojeda / vscode-svx

Adds language support for Markdown with Svelte
MIT License
3 stars 1 forks source link

Feature request: detect Svelte template blocks as Svelte instead of Markdown #2

Open henrikvilhelmberglund opened 1 year ago

henrikvilhelmberglund commented 1 year ago

It would be nice if Svelte template blocks {#each} and so on could be detected as Svelte instead of Markdown. Example of current behavior: Code_26_15-54-55crFxhDQZ2e

henrikvilhelmberglund commented 1 year ago

I don't know regex at all but ended up with this

 {
              "begin": "^(?=\\s*[{#]\\w*)",
              "end": "(?<=})",
              "contentName": "source.svelte",
              "patterns": [{ "include": "source.svelte" }]
            },

seems to work!