From 808b90c0318114f5038a23b0940484a3ed126db5 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 5 Oct 2026 04:45:51 +0200 Subject: [PATCH] fix: line breaks in chat messages disappear after reloading the page (#31869) Lines separated by a single newline show on separate lines while you chat, but after reloading the page or opening a chat by its URL they run together into one line, and on shared chat links they always did. The single-newline line break setting was only switched on once the chat input had loaded, so any message shown before that rendered without it. It is now on from the start, so messages look the same after a reload, from a URL and on shared links as they do while chatting. --- src/lib/components/chat/Messages/Markdown.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/components/chat/Messages/Markdown.svelte b/src/lib/components/chat/Messages/Markdown.svelte index 812cf7e138..a54be2b073 100644 --- a/src/lib/components/chat/Messages/Markdown.svelte +++ b/src/lib/components/chat/Messages/Markdown.svelte @@ -19,6 +19,8 @@ marked.use(footnoteExtension(options)); marked.use(colonFenceExtension(options)); marked.use(disableSingleTilde); + // Also set by RichTextInput, but messages can render before any input mounts. + marked.use({ breaks: true }); marked.use({ extensions: [ mentionExtension({ triggerChar: '@' }),