Switch to svelte-markdown

This commit is contained in:
Niek van der Maas
2023-03-06 14:15:52 +01:00
parent 54c199c8bf
commit 3b35868a06
4 changed files with 83 additions and 8 deletions

23
src/lib/Code.svelte Normal file
View File

@@ -0,0 +1,23 @@
<script lang="ts">
// Disabled for now - it blows up the size too much
import { HighlightAuto } from "svelte-highlight";
import style from "svelte-highlight/styles/edge-light";
export let type: "code";
export let raw: string;
export let codeBlockStyle: "indented" | undefined = undefined;
export let lang: string | undefined = undefined;
export let text: string;
// Disable warnings
type = "code";
raw;
codeBlockStyle;
lang;
</script>
<svelte:head>
{@html style}
</svelte:head>
<HighlightAuto code={text} />