[BUG] Dollar signs in chat output trigger LaTeX math rendering, corrupting surrounding text

Resolved 💬 3 comments Opened Mar 12, 2026 by ronindataco Closed Apr 18, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

In the browser-based Claude Code UI, dollar signs ($) in Claude's chat output are treated as LaTeX/KaTeX math delimiters. Any text appearing between two $ signs loses spaces, has special characters converted, and renders as math notation instead of plain text.

What Should Happen?

Expected behavior
Dollar signs render as literal $ characters with surrounding text intact.

Actual behavior
Text between two $ signs is interpreted as a math expression. Spaces are stripped, ** becomes ∗∗, and the dollar signs disappear. Examples from a real session:

$10K flat, Phase 2 at $8K → 10Kflat,Phase2at8K
$155 lifetime spend, $34 → 155lifetimespend,34
$800** → 800∗∗

Error Messages/Logs

Steps to Reproduce

Use the browser-based Claude Code UI
Ask Claude to output any response containing multiple dollar sign amounts (e.g. pricing, earnings figures)
Observe the rendered output

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.74

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗