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.
This commit is contained in:
Classic298 2026-10-05 04:45:51 +02:00 • committed by GitHub
parent 1e834c09e2
commit 808b90c031
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: '@' }),