refac
This commit is contained in:
@@ -33,11 +33,6 @@
|
||||
<MarkdownInlineTokens id={`${id}-${tokenIdx}-h`} tokens={token.tokens} />
|
||||
</svelte:element>
|
||||
{:else if token.type === 'code'}
|
||||
{#if token.lang === 'html'}
|
||||
{dispatch('code', {
|
||||
lang: token.lang
|
||||
})}
|
||||
{/if}
|
||||
{#if token.raw.includes('```')}
|
||||
<CodeBlock
|
||||
id={`${id}-${tokenIdx}`}
|
||||
@@ -45,6 +40,9 @@
|
||||
lang={token?.lang ?? ''}
|
||||
code={revertSanitizedResponseContent(token?.text ?? '')}
|
||||
{save}
|
||||
on:code={(e) => {
|
||||
dispatch('code', e.detail);
|
||||
}}
|
||||
on:save={(e) => {
|
||||
dispatch('update', {
|
||||
raw: token.raw,
|
||||
|
||||
Reference in New Issue
Block a user