Skip to content

Commit 3d500d6

Browse files
committed
fix: add extra space between paragraphs in reasoning renderer
1 parent feecc17 commit 3d500d6

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

src/lib/components/chat/MarkdownRenderer.svelte

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,16 @@
101101
});
102102
</script>
103103

104-
<div
105-
class="prose max-w-none dark:prose-invert max-sm:prose-sm prose-headings:font-semibold prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-pre:bg-gray-800 dark:prose-pre:bg-gray-900"
106-
>
107-
{#each marked.lexer(content) as token}
108-
{#if token.type === "code"}
109-
<CodeBlock lang={token.lang} code={token.text} />
110-
{:else}
111-
{#await marked.parse(token.raw) then parsed}
112-
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
113-
{@html parsed}
114-
{/await}
115-
{/if}
116-
{/each}
117-
</div>
104+
{#each marked.lexer(content) as token}
105+
{#if token.type === "code"}
106+
<CodeBlock lang={token.lang} code={token.text} />
107+
{:else}
108+
{#await marked.parse(token.raw) then parsed}
109+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
110+
{@html parsed}
111+
{/await}
112+
{/if}
113+
{/each}
118114

119115
<style lang="postcss">
120116
:global(.katex-display) {

src/lib/components/chat/OpenReasoningResults.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</summary>
5353

5454
<div
55-
class="border-t border-gray-200 px-5 pb-2 pt-2 text-sm text-gray-600 dark:border-gray-800 dark:text-gray-400"
55+
class="border-t border-gray-200 px-5 pb-2 pt-2 text-sm text-gray-600 dark:border-gray-800 dark:text-gray-400 space-y-4"
5656
>
5757
<MarkdownRenderer {content} />
5858
</div>

0 commit comments

Comments
 (0)