From d397f92cd7f4fddcc17e9d67c1bc922bfc9a2d72 Mon Sep 17 00:00:00 2001 From: H-Chris233 Date: Mon, 4 May 2026 17:47:59 +0800 Subject: [PATCH] Restore QA single-newline rendering behavior Code review flagged a UX regression after sanitizer refactor: assistant single newlines stopped rendering as hard breaks. Re-enable marked breaks mode in the shared QA renderer to preserve previous panel readability for streamed and lightly formatted answers. Constraint: Keep sanitizer fix while matching prior QA markdown display behavior Rejected: Add newline post-processing in QaPanel | duplicates renderer concern and increases drift risk Confidence: high Scope-risk: narrow Directive: QA markdown display flags must be centralized in qaMarkdown.ts to keep streaming/final parity Tested: npm run build (openless-all/app) Not-tested: Manual visual QA panel check on desktop runtime --- openless-all/app/src/lib/qaMarkdown.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/openless-all/app/src/lib/qaMarkdown.ts b/openless-all/app/src/lib/qaMarkdown.ts index 4fb9a86e..a29a2f13 100644 --- a/openless-all/app/src/lib/qaMarkdown.ts +++ b/openless-all/app/src/lib/qaMarkdown.ts @@ -59,6 +59,7 @@ export function renderQaMarkdown(markdown: string): string { return marked.parse(escaped, { async: false, gfm: true, + breaks: true, renderer: QA_MARKDOWN_RENDERER, }) as string; }