Skip to content

Rendered KaTeX also shows a garbled plaintext duplicate of the formula #240

Description

@exAClior

Before filing

Closest existing issue

none found

Split from the same session as a second, independent bug: TeX \(...\) / \[...\] and single-dollar $...$ never become math at all. Filed separately.

What's broken

When chat math does render, the typeset formula is accompanied by extra text. Inline $$\Omega$$ becomes ΩΩ. Display $$ and fenced math show the real equation plus leftover Ω = n=1Σ∞ n21.

Steps to reproduce

  1. Launch Berd 0.6.2.

  2. New chat. Goose, Grok 4.6 via xAI (xai_oauth).

  3. Display $$\Omega$$ on its own line of prose.

  4. Display a block:

    $$
    \Omega = \sum_{n=1}^{\infty} \frac{1}{n^2}
    $$
    
  5. Display the same equation in a fenced math code block.

What you expected to happen

One typeset formula. No second copy, no doubled glyph.

What actually happened

From a screenshot of the live bubble:

  • Inline $$\Omega$$ rendered as ΩΩ (two omegas, not one).
  • Display $$ showed a correct centered KaTeX formula and leftover Ω = n=1Σ∞ n21.
  • Fenced math did the same: correct KaTeX plus the same leftover string.

Observation only, not claimed root cause: the leftover string looks like the TeX with commands stripped, which is how unhidden KaTeX MathML often appears.

How often does it happen?

Every time — reliably reproducible

Berd version

0.6.2

Operating system

macOS (Apple Silicon)

Model and provider

Grok 4.6 via xAI (Goose / xai_oauth)

Relevant log output

no relevant log output

Looked at ~/Library/Logs/xyz.block.berd/berd.log around the turn. Nothing about KaTeX / math / Streamdown.

Screenshots, recordings, or other context

Screenshot of this session’s live delimiter matrix (same capture as the companion issue):

Chat bubble showing doubled Ω and leftover plaintext next to rendered KaTeX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions