Skip to content

fix(telegram): add MarkdownV2 support for strikethrough, spoiler, and blockquotes - #2199

Merged
teknium1 merged 1 commit into
NousResearch:mainfrom
llbn:fix/telegram-markdownv2-features
Mar 20, 2026
Merged

fix(telegram): add MarkdownV2 support for strikethrough, spoiler, and blockquotes#2199
teknium1 merged 1 commit into
NousResearch:mainfrom
llbn:fix/telegram-markdownv2-features

Conversation

@llbn

@llbn llbn commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add strikethrough conversion (~~text~~~text~) to format_message() pipeline
  • add spoiler conversion (||text||||text||) with pipe characters protected from escaping
  • add blockquote support (> text) by preserving > at line start instead of escaping it
  • update _strip_mdv2() to strip ~strikethrough~ and ||spoiler|| markers in plaintext fallback
  • add 14 regression tests covering new formatting paths and edge cases

Testing

./.venv/bin/python -m pytest tests/gateway/test_telegram_format.py -q

Fixes #2198

… blockquotes

- Convert ~~text~~ to ~text~ (MarkdownV2 strikethrough)
- Protect ||text|| from pipe escaping (MarkdownV2 spoiler)
- Preserve > at line start as blockquote instead of escaping it
- Update _strip_mdv2() to strip ~strikethrough~ and ||spoiler|| markers
- Add tests covering new formatting paths and edge cases
@teknium1
teknium1 merged commit f853e50 into NousResearch:main Mar 20, 2026
1 check passed
@llbn
llbn deleted the fix/telegram-markdownv2-features branch March 20, 2026 22:48
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…2-features

Clean PR, well-tested. Adds MarkdownV2 strikethrough, spoiler, and blockquote support to Telegram adapter.
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…2-features

Clean PR, well-tested. Adds MarkdownV2 strikethrough, spoiler, and blockquote support to Telegram adapter.
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…2-features

Clean PR, well-tested. Adds MarkdownV2 strikethrough, spoiler, and blockquote support to Telegram adapter.
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…2-features

Clean PR, well-tested. Adds MarkdownV2 strikethrough, spoiler, and blockquote support to Telegram adapter.
melon-xf added a commit to melon-xf/hermes-agent that referenced this pull request Sep 3, 2026
…2-features

Clean PR, well-tested. Adds MarkdownV2 strikethrough, spoiler, and blockquote support to Telegram adapter.
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.

[Bug]: Telegram adapter missing MarkdownV2 support for strikethrough, spoiler, and blockquotes

2 participants