### What happened / 发生了什么 钉钉适配器中,如果yield event.plain_result(msg)中的msg只有一个换行符\n,那么在钉钉收到的消息中没有换航 需要输入\n\n才能换行。 ### Reproduce / 如何复现? msg = f"📜 【角色详情:{character.name_zh}】\n" msg += f"简介:{character.description}\n" yield event.plain_result(msg) <img width="455" height="127" alt="Image" src="https://github.com/user-attachments/assets/5e81fc34-3b88-4831-a5c9-8571a5dcbe53" /> msg = f"📜 【角色详情:{character.name_zh}】\n\n" msg += f"简介:{character.description}\n\n" yield event.plain_result(msg) <img width="415" height="108" alt="Image" src="https://github.com/user-attachments/assets/3567aeb2-a548-4ca4-b3fc-b6493e7c11b2" /> ### AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器 astrbot: v4.10.2 ### OS macOS ### Logs / 报错日志 无报错 ### Are you willing to submit a PR? / 你愿意提交 PR 吗? - [ ] Yes! ### Code of Conduct - [x] I have read and agree to abide by the project's [Code of Conduct](https://docs.github.com/zh/site-policy/github-terms/github-community-code-of-conduct)。
Activity
dosubot commentedon Jan 14, 2026
钉钉适配器需要两个
\n才能换行,是因为 AstrBot 发送消息时用的是钉钉的 markdown 格式接口(client.reply_markdown),而在 Markdown 语法里,单个换行符不会显示为换行,只有两个换行(\n\n)或插入<br/>才能产生可见的段落分隔或换行效果。这不是 AstrBot 的 bug,而是钉钉平台对 Markdown 渲染的标准行为,AstrBot 只是原样传递文本,没有做特殊处理。相关代码实现建议:如果需要换行,直接用
\n\n或<br/>。这个行为目前没有在 AstrBot 文档里明确说明,后续可以考虑补充到 FAQ 或文档里,方便新用户快速了解。To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.