Syntax highlighting for svelte code with refractor. Simple wrapper around prism-svelte by pngwn so it can be registered as additional syntax in refractor
.
npm i refractor-svelte
const refractor = require('refractor');
const svelte = require('refractor-svelte');
refractor.register(svelte)
console.log(refractor.highlight('{#each items as item, i}{item.name}{/each}', 'svelte'))