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
This commit is contained in:
H-Chris233 committed 2026-05-04 17:47:59 +08:00
1 parent 7edd0cde9e
commit d397f92cd7
1 file changed
+1
+1
View File
@@ -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;
}