From 0f6f47fb55e7706125464b12f700b550ef933571 Mon Sep 17 00:00:00 2001 From: youpaishidifu Date: Fri, 18 Sep 2026 09:52:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20Bot=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E4=BF=9D=E7=95=99Markdown=E6=A0=BC=E5=BC=8F=EF=BC=88=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E5=92=8C=E5=88=97=E8=A1=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除_clean_markdown()调用,改为仅清理
标签 - 保留标题(##)和列表短杠(-)等格式 - 关联Task #1740 --- auto_reply.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/auto_reply.py b/auto_reply.py index 354ef4a..7178086 100644 --- a/auto_reply.py +++ b/auto_reply.py @@ -697,7 +697,8 @@ class AutoReply: if not answer: return None - # 清理 HTML 换行标签(纯文本消息里
会原形显示) + # ⭐ Task #1740: 保留 Markdown 格式(标题、列表短杠) + # 只清理影响显示的 HTML 换行标签,不破坏结构 import re answer = re.sub(r'', '\n', answer, flags=re.IGNORECASE) answer = answer.strip() @@ -711,9 +712,6 @@ class AutoReply: _keep_links = _is_download_intent and _has_url if _keep_links: logger.debug(f"[{platform}] 下载意图,保留链接格式") - - # 清理 Markdown 格式,返回纯文本(下载类保留链接) - answer = self._clean_markdown(answer, keep_links=_keep_links) if not answer: return None