Skip to content

feat: rich HTML formatting for Telegram messages#145

Open
Fr4nzz wants to merge 1 commit intoRichardAtCT:mainfrom
Fr4nzz:feat/rich-html-formatting
Open

feat: rich HTML formatting for Telegram messages#145
Fr4nzz wants to merge 1 commit intoRichardAtCT:mainfrom
Fr4nzz:feat/rich-html-formatting

Conversation

@Fr4nzz
Copy link

@Fr4nzz Fr4nzz commented Mar 15, 2026

Summary

  • Convert markdown tables to aligned monospace <pre> blocks with box-drawing characters
  • Add native <blockquote> support for markdown blockquotes
  • Add bullet list (• ), numbered list, and horizontal rule conversion
  • Fix HTML tag nesting issues (<b><i>...</i></b> vs <i><b>...</i></b>) that cause Telegram to reject messages
  • Add _repair_html_nesting() that automatically fixes overlapping inline tags

Test plan

  • Send Claude a prompt asking for tables, code blocks, blockquotes, lists
  • Verify tables render in monospace <pre> blocks with aligned columns
  • Verify blockquotes use native Telegram <blockquote> tags
  • Verify bold+italic nesting doesn't cause "Can't parse entities" errors
  • Test fallback: malformed HTML stripped to plain text instead of showing raw tags

🤖 Generated with Claude Code

- Convert markdown tables to aligned monospace <pre> blocks
- Add blockquote support (> text → <blockquote>)
- Add bullet list conversion (- item → • item)
- Add numbered list formatting
- Add horizontal rule conversion (--- → ──────────)
- Fix HTML tag nesting issues that cause Telegram rejection
- Add _repair_html_nesting() to fix overlapping bold/italic tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant