mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-27 06:59:38 +00:00
Bot API 10.1 rich messages parse structured HTML, so bare newlines collapse as insignificant whitespace and flatten multi-paragraph replies and bullet runs into a single line. Materialize logical line breaks as <br> in prepareTelegramRichHtml -- the shared rich send/edit/draft chokepoint covering both the Markdown and explicit-HTML text modes -- while keeping newlines literal inside code/pre/math and where they only separate structural tags (block elements plus table/figure/details container children, so pretty-printed rich HTML keeps valid markup). Refs #95409