mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-08-08 20:25:47 +00:00
13 lines
332 B
Svelte
13 lines
332 B
Svelte
<script lang="ts">
|
|
import { onMount } from 'svelte';
|
|
import type { HighlightAuto } from 'svelte-highlight';
|
|
|
|
export let code: string;
|
|
|
|
let component: typeof HighlightAuto;
|
|
onMount(async () => {
|
|
component = (await import('svelte-highlight')).HighlightAuto;
|
|
});
|
|
</script>
|
|
|
|
<svelte:component this={component} {code} />
|