mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-02 02:12:25 +00:00
fix: keep citation chips inside bold, italic and linked text (#30278)
This commit is contained in:
parent
4c00e08aa1
commit
f2220d2e40
1 changed files with 7 additions and 5 deletions
|
|
@ -86,7 +86,7 @@
|
|||
title={token.title}
|
||||
on:click={(e) => handleLinkClick(e, token.href)}
|
||||
>
|
||||
<svelte:self id={`${id}-a`} tokens={token.tokens} {onSourceClick} {done} />
|
||||
<svelte:self id={`${id}-a`} tokens={token.tokens} {sourceIds} {onSourceClick} {done} />
|
||||
</a>
|
||||
{:else}
|
||||
<a
|
||||
|
|
@ -100,17 +100,19 @@
|
|||
{:else if token.type === 'image'}
|
||||
<Image src={token.href} alt={token.text} allowExternal={true} />
|
||||
{:else if token.type === 'strong'}
|
||||
<strong><svelte:self id={`${id}-strong`} tokens={token.tokens} {onSourceClick} /></strong>
|
||||
<strong
|
||||
><svelte:self id={`${id}-strong`} tokens={token.tokens} {sourceIds} {onSourceClick} /></strong
|
||||
>
|
||||
{:else if token.type === 'em'}
|
||||
<em><svelte:self id={`${id}-em`} tokens={token.tokens} {onSourceClick} /></em>
|
||||
<em><svelte:self id={`${id}-em`} tokens={token.tokens} {sourceIds} {onSourceClick} /></em>
|
||||
{:else if token.type === 'codespan'}
|
||||
<CodespanToken {token} {done} />
|
||||
{:else if token.type === 'br'}
|
||||
<br />
|
||||
{:else if token.type === 'del'}
|
||||
<del><svelte:self id={`${id}-del`} tokens={token.tokens} {onSourceClick} /></del>
|
||||
<del><svelte:self id={`${id}-del`} tokens={token.tokens} {sourceIds} {onSourceClick} /></del>
|
||||
{:else if token.type === 'underline'}
|
||||
<u><svelte:self id={`${id}-underline`} tokens={token.tokens} {onSourceClick} /></u>
|
||||
<u><svelte:self id={`${id}-underline`} tokens={token.tokens} {sourceIds} {onSourceClick} /></u>
|
||||
{:else if token.type === 'inlineKatex'}
|
||||
{#if token.text}
|
||||
<KatexRenderer content={token.text} displayMode={token?.displayMode ?? false} />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue