[BUG] Markdown Code Formatting: Prevent Unintended Italicization in Code Samples

Resolved 💬 6 comments Opened Dec 16, 2025 by pbozeman Closed Feb 25, 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?

I am resubmitting #3354.

If claude code tries to respond with snake_case in a user response, the e_c turns on italics/highlight and it doesn't turn off until another_case.

The suggested work around in https://github.com/anthropics/claude-code/issues/3354#issuecomment-3592174775 was to provide instructions to claude to not do this.

I made several attempts at this, working with claude.ai, see https://claude.ai/chat/842757d5-5c2a-429a-97bd-2a83c21233f8 and could not prevent this from happening.

See https://claude.ai/chat/842757d5-5c2a-429a-97bd-2a83c21233f8 for the attempted claude.md overide suggestions, and how they rendered snake_case. I went through several iterations.

Claude.ai's final summary was, "This is getting increasingly absurd though. You're basically writing a style guide to work around a renderer that doesn't handle CommonMark properly and doesn't escape conflicting syntax. Definitely worth a /bug report at this point."

What Should Happen?

Claude code's representation of snake_case in a chat response should not activate highlights/italics.

Error Messages/Logs

Steps to Reproduce

Create code with snake_case. Ask claude about it.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.70 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

<img width="926" height="465" alt="Image" src="https://github.com/user-attachments/assets/b409ec52-9ffe-4842-b671-9d1be27f98ff" />

View original on GitHub ↗

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