Commit Graph

11 Commits

Author SHA1 Message Date
Sid
2e84017f23 fix(markdown): require paired || delimiters for spoiler detection (#26105)
* fix(markdown): require paired || delimiters for spoiler detection

An unpaired || (odd count across all inline tokens) would open a
spoiler that never closes, causing closeRemainingStyles to extend it
to the end of the text. This made all content after an unpaired ||
appear as hidden/spoiler in Telegram.

Pre-count || delimiters across the entire inline token group and skip
spoiler injection entirely when the count is less than 2 or odd. This
prevents single | characters and unpaired || from triggering spoiler
formatting.

Closes #26068

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: preserve valid spoiler pairs with trailing unmatched delimiters (#26105) (thanks @Sid-Qin)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-02-25 04:54:51 +00:00
Peter Steinberger
58254b3b57 test: dedupe channel and transport adapters 2026-02-21 21:44:01 +00:00
Peter Steinberger
b97b8908b9 test: remove duplicate telegram .co link formatting case 2026-02-19 08:00:05 +00:00
Peter Steinberger
363a56ab87 refactor(telegram): streamline file-ref wrapping and hoist regexes 2026-02-14 01:03:50 +01:00
大猫子
8dd60fc7d9 feat(telegram): render blockquotes as native <blockquote> tags (#14608) (#14626)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 4a967c51f560fea33694a980bda0d76be6385c71
Co-authored-by: lailoo <20536249+lailoo@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
2026-02-12 08:11:57 -05:00
ezhikkk
e02d144af9 feat(telegram): add spoiler tag support (#11543)
* feat(telegram): add spoiler tag support

Render markdown ||spoiler|| syntax as <tg-spoiler> tags in Telegram HTML output.

The markdown IR already parses spoiler syntax, but the Telegram renderer was
missing the style marker. This adds the spoiler marker to renderTelegramHtml().

Fixes spoiler text appearing as raw ||text|| instead of hidden text.

* fix: enable Telegram spoiler rendering (#11543) (thanks @ezhikkk)

---------

Co-authored-by: Параша <parasha@openclaw.local>
Co-authored-by: Muhammed Mukhthar CM <mukhtharcm@gmail.com>
2026-02-08 11:25:56 +05:30
cpojer
f06dd8df06 chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
Ayaan Zaidi
da71eaebd2 fix: correct telegram html nesting (#4578) (thanks @ThanhNguyxn) 2026-01-30 16:53:39 +05:30
ThanhNguyxn
8e5a684445 style: format test file 2026-01-30 16:53:39 +05:30
ThanhNguyxn
b05d57964b fix(telegram): properly nest overlapping HTML tags (#4071)
Unify style and link closing in render.ts to use LIFO order across
both element types, fixing cases where bold/italic spans containing
autolinks produced invalid HTML like <b><a></b></a>.
2026-01-30 16:53:39 +05:30
Peter Steinberger
2140caaf67 fix: telegram html formatting (#435, thanks @RandyVentures) 2026-01-08 02:34:32 +01:00