migrate: change settings from a store to a state

This commit is contained in:
Xylight committed 2024-10-25 21:09:32 -07:00
1 parent ffcd9faa96
commit d597349887
128 files changed
+1010 -1144

No files matched your search

+4 -7
View File
@@ -92,8 +92,6 @@
import SvelteMarkdown from 'svelte-markdown'
options.inline = inline
interface Props {
source?: string
inline?: boolean
@@ -110,10 +108,9 @@
class: clazz = '',
}: Props = $props()
let tokens
run(() => {
tokens = marked.lexer(source)
})
options.inline = inline
let tokens = $derived.by(() => marked.lexer(source))
</script>
<div
@@ -123,7 +120,7 @@
{style}
>
<SvelteMarkdown
bind:source={tokens}
source={tokens}
{renderers}
{options}
isInline={inline || undefined}