Skip to content

voice: the speech shaper drops ``` fences but still reads ~~~ fences and indented code blocks aloud #17953

Description

@mrveiss

Found in review of the #13102 speech shaper (createSpeechShaper in autobot-frontend/src/utils/ttsSentences.ts).

The shaper drops fenced code blocks delimited by ``` (including a marker split across streamed slices), but two other markdown code-block forms are still read aloud:

  • ~~~ fences. The tildes are removed by the emphasis rule, and the code body is spoken.
  • Indented code blocks (4-space or tab indented lines after a blank line).

Both are rarer than backtick fences in assistant output, but when they appear the same "symbol soup" problem as #13102 returns.

Acceptance criteria

  • ~~~ fences are dropped like ``` fences, including when the marker splits across two streamed slices. The partial-marker hold must not swallow ~~strikethrough~~.
  • Indented code blocks are dropped from the spoken copy, without dropping indented prose such as nested list items.
  • Tests cover both forms and the prose cases that must survive.

Activity

  1. mrveiss commented on Oct 4, 2026

    @mrveiss
    OwnerAuthor

    Partly delivered in #17954 (2cac6e35eb). ~~~ fences are now dropped like backtick fences: CommonMark line-start rules, close only on the same character at least as long, and a split ~~ marker held only when it stands alone on its line, so ~~strikethrough~~ survives. Tests cover both forms. Still open: indented code blocks. #17954 says Refs #17953, not Closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions