Files
hermes-agent/tests/conformance
Brooklyn Nicholson c82abc309a fix(telegram): widen fence anchors to keep mid-line and indented blocks
The anchored fence regex from the upstream commits (kept here via
cherry-pick) fixed #85381 but required the opening ``` to sit at a
line start with <=3 spaces of indent, silently downgrading two shapes
that main renders as <pre> into escaped literal prose:

- mid-line-opened fences ("Here is the code: ```python")
- fences indented by 4+ spaces (list/blockquote-nested code)

Widen the anchors while keeping the inline-triple fix:

- the opening line may now carry any leading whitespace or lead-in
  prose, as long as the opening ``` is the first triple-backtick run
  on the line and the rest of the line is backtick-free (so an inline
  pair like ```x``` can never end a line and open a fence);
- the closing fence may sit at any indent, not just 0-3 spaces.

The tempered prefix cannot skip past an earlier triple-backtick run,
so an inline pair followed later by a real fence no longer swallows
it (both main and the anchored regex mangled that mix in different
ways). The scar conformance vector reverts to main's committed value:
the mid-line-opened fence it encodes is protected again.
2026-10-02 22:25:39 -05:00
..