Closed mertgibi closed 1 year ago
im using svelte-highlight in my project
highlight.svelte - component
<script> import { HighlightAuto } from "svelte-highlight"; import atomOneDark from "svelte-highlight/styles/atom-one-dark"; export let html const code = html </script> <svelte:head> {@html atomOneDark} </svelte:head> <HighlightAuto {code} />
error
but... but i don't get this error if used like this
<script> import { HighlightAuto } from "svelte-highlight"; import atomOneDark from "svelte-highlight/styles/atom-one-dark"; const code = ".body { padding: 0; margin: 0; }"; </script> <svelte:head> {@html atomOneDark} </svelte:head> <HighlightAuto {code} />
okay, i solved
HTML variable is array
im using svelte-highlight in my project
highlight.svelte - component
error
but... but i don't get this error if used like this
highlight.svelte - component