From: Anderson A. Giacomolli Date: Sat, 7 Nov 2026 15:23:09 +0000 (-0300) Subject: Split long replies between Markdown blocks X-Git-Url: https://git.giacomolli.uk/onechat/commitdiff_plain/97729fc59a2fbd73e3f8a424cae4c825f5ba885b?ds=sidebyside;hp=97729fc59a2fbd73e3f8a424cae4c825f5ba885b Split long replies between Markdown blocks splitRich cuts the Markdown of a reply into parts of at most 32768 bytes, the limit of the Markdown of one rich message. It cuts after a blank line outside a code block, so a table, a code block, and a paragraph stay whole, and each part renders as the reply would. When no such cut fits, it cuts after a line break outside a code block, and then inside a code block, which it closes at the end of the part and opens again with the same fence line in the next part. A single line over the limit is cut at the limit, never inside a character. The Bot API allows 32768 characters of rendered text and does not say if a character is a byte. The bytes of the Markdown are at least the characters of the text, so a part is never over the limit. The bot does not use splitRich yet. Issue: fec23f9 ---