mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac: markdown br rendering
This commit is contained in:
parent
d2a3aacaba
commit
d4f70830d1
1 changed files with 6 additions and 1 deletions
|
|
@ -121,7 +121,12 @@
|
||||||
{/if}
|
{/if}
|
||||||
{:else if token.text.includes(`<source_id`)}
|
{:else if token.text.includes(`<source_id`)}
|
||||||
<Source {id} {token} onClick={onSourceClick} />
|
<Source {id} {token} onClick={onSourceClick} />
|
||||||
|
{:else}
|
||||||
|
{@const br = token.text.match(/<br\s*\/?>/)}
|
||||||
|
{#if br}
|
||||||
|
<br />
|
||||||
{:else}
|
{:else}
|
||||||
{token.text}
|
{token.text}
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue