Bläddra i källkod

Merge pull request #10002 from alpha-pet/fix-markdown-inline-whitespace

fix: remove whitespace to improve typesetting for inline Markdown
Timothy Jaeryang Baek 2 månader sedan
förälder
incheckning
a13f90fc60

+ 3 - 9
src/lib/components/chat/Messages/Markdown/MarkdownInlineTokens.svelte

@@ -44,13 +44,9 @@
 	{:else if token.type === 'image'}
 	{:else if token.type === 'image'}
 		<Image src={token.href} alt={token.text} />
 		<Image src={token.href} alt={token.text} />
 	{:else if token.type === 'strong'}
 	{: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} {onSourceClick} /></strong>
 	{:else if token.type === 'em'}
 	{: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} {onSourceClick} /></em>
 	{:else if token.type === 'codespan'}
 	{:else if token.type === 'codespan'}
 		<!-- svelte-ignore a11y-click-events-have-key-events -->
 		<!-- svelte-ignore a11y-click-events-have-key-events -->
 		<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
 		<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
@@ -64,9 +60,7 @@
 	{:else if token.type === 'br'}
 	{:else if token.type === 'br'}
 		<br />
 		<br />
 	{:else if token.type === 'del'}
 	{: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} {onSourceClick} /></del>
 	{:else if token.type === 'inlineKatex'}
 	{:else if token.type === 'inlineKatex'}
 		{#if token.text}
 		{#if token.text}
 			<KatexRenderer content={token.text} displayMode={false} />
 			<KatexRenderer content={token.text} displayMode={false} />