CLI markdown renderer has broken syntax highlighting in Windows Terminal

Resolved 💬 3 comments Opened Feb 1, 2026 by tom-un Closed Feb 5, 2026

When using Claude Code CLI in Windows Terminal, code blocks in responses have broken syntax highlighting where random substrings within words get colored differently.

Example:
In the bash code unset ANTHROPIC_API_KEY, the substring "ROPIC" (in the middle of ANTHROPIC_API_KEY) renders in a different color than the rest of the variable name.

Environment:

  • Claude Code CLI (latest version)
  • Windows Terminal
  • Happens consistently with bash code blocks

Expected behavior:
Variable names like ANTHROPIC_API_KEY should be highlighted as a single token, not have random substrings colored differently.

Actual behavior:
The markdown renderer breaks words at incorrect boundaries, causing partial word highlighting that makes code harder to read.

View original on GitHub ↗

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