mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
33109a1676
When markdownToTelegramHTML expands a chunk beyond 4096 chars (e.g. **a** → <b>a</b>), re-split the markdown with a proportionally smaller maxLen so each resulting HTML chunk fits within Telegram's limit. Extract sendHTMLChunk helper to avoid duplicating the HTML-send + plain-text-fallback logic. Add test case for markdown-short-but-HTML-long scenario to verify the re-splitting behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>