mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +00:00
refac: code rendering
This commit is contained in:
parent
6fdfa62845
commit
c3862bc387
@ -33,6 +33,7 @@
|
||||
<MarkdownInlineTokens id={`${id}-${tokenIdx}-h`} tokens={token.tokens} />
|
||||
</svelte:element>
|
||||
{:else if token.type === 'code'}
|
||||
{#if token.raw.includes('```')}
|
||||
<CodeBlock
|
||||
id={`${id}-${tokenIdx}`}
|
||||
{token}
|
||||
@ -47,6 +48,9 @@
|
||||
});
|
||||
}}
|
||||
/>
|
||||
{:else}
|
||||
{unescapeHtml(token.text)}
|
||||
{/if}
|
||||
{:else if token.type === 'table'}
|
||||
<div class="scrollbar-hidden relative whitespace-nowrap overflow-x-auto max-w-full">
|
||||
<table class="w-full">
|
||||
|
Loading…
Reference in New Issue
Block a user