From 8b5d0e920080975e1753ca64d352f69e2617846d Mon Sep 17 00:00:00 2001 From: Suzumiya Date: Tue, 15 Sep 2026 23:46:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Markdown=20=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E5=BD=92=E4=B8=80=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 先统一 CRLF 与 LF,再压缩正文中的多余空行 --- .../src/components/ChatMarkdownMessage/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx index 72cd5b777..d743dc2c2 100644 --- a/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx +++ b/apps/ai-game-creator-shell/src/components/ChatMarkdownMessage/index.tsx @@ -18,6 +18,7 @@ export type ChatMarkdownMessageProps = { /** 只压缩普通 Markdown 正文里多余的空行;代码块中的换行必须原样保留。 */ function normalizeMarkdownBlankLines(text: string) { return text + .replace(/\r\n?/g, '\n') .split(/(```[\s\S]*?```)/g) .map((part, index) => index % 2 === 1