Timothy Jaeryang Baek 4 месяцев назад
Родитель
Сommit
61a2909a88
1 измененных файлов с 3 добавлено и 6 удалено
  1. 3 6
      src/lib/components/chat/Messages/Markdown/HTMLToken.svelte

+ 3 - 6
src/lib/components/chat/Messages/Markdown/HTMLToken.svelte

@@ -131,12 +131,9 @@
 		{/if}
 	{:else if token.text.includes(`<source_id`)}
 		<Source {id} {token} onClick={onSourceClick} />
+	{:else if token.text.trim().match(/^<br\s*\/?>$/i)}
+		<br />
 	{:else}
-		{@const br = token.text.match(/<br\s*\/?>/)}
-		{#if br}
-			<br />
-		{:else}
-			{token.text}
-		{/if}
+		{token.text}
 	{/if}
 {/if}