mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-26 09:21:23 -04:00
fix: keep citation chips inside bold, italic and linked text (#30278)
This commit is contained in:
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user