Closed rscheuer closed 9 months ago
Funnily enough, this library used to use that plugin.
To keep dependencies to a minimum, however, this library ships its own HighlightSvelte
component which combines the existing XML/CSS/JS grammars.
<script>
import { HighlightSvelte } from "svelte-highlight";
import atomOneDark from "svelte-highlight/styles/atom-one-dark";
const code = `<button on:click={() => { console.log(0); }}>Click me</button>`;
</script>
<svelte:head>
{@html atomOneDark}
</svelte:head>
<HighlightSvelte {code} />
highlightjs-svelte (confusing, I know) supports Svelte syntax highlighting.
Would be great if this library included this as well. Thanks for all the great work on this!