# Chat renders wrong content in markdown code blocks - substitutes sections

**URL:** <https://forum.cursor.com/t/chat-renders-wrong-content-in-markdown-code-blocks-substitutes-sections/145269>\
**Category:** Bug Reports\
**Created:** [December 4, 2025, 5:37pm UTC](https://forum.cursor.com/t/chat-renders-wrong-content-in-markdown-code-blocks-substitutes-sections/145269 "2025-12-04T17:37:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaegoorn48](https://avatars.discourse-cdn.com/v4/letter/k/e8c25b/32.png) [@kaegoorn48](https://forum.cursor.com/u/kaegoorn48)\
**Post date:** [December 4, 2025, 5:37pm UTC](https://forum.cursor.com/t/chat-renders-wrong-content-in-markdown-code-blocks-substitutes-sections/145269/1 "2025-12-04T17:37:50Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Cursor Chat has a critical markdown rendering bug where code blocks display content from a completely different section of the document.  
Specifically: a regular text code block (ASCII directory tree) is being replaced with Mermaid diagram code from another section.

### Steps to Reproduce

1. Create a markdown file with multiple sections
2. Include a Mermaid diagram in Section 1.4:

```markdown
### 1.4. Diagram
\`\`\`mermaid
graph TD
    subgraph "Layer"
        A[Component]
    end
\`\`\`

```

1. Include a regular code block in Section 2.1:

```markdown
### 2.1. Directory Tree
\`\`\`
res://
├── scenes/
│ ├── main/
\`\`\`

```

1. Send this content via Cursor Chat
2. View the rendered output in Chat

### Expected Behavior

Section 2.1 should display the directory tree as written in the file.

### Screenshots / Screen Recordings

 ![Screenshot_20251204_183429.png](https://us1.discourse-cdn.com/cursor1/original/3X/d/f/df9c78278b33187cfc11faf36ee2a26319168818.png)

### Operating System

Linux

### Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.46  
VSCode Version: 1.105.1  
Commit: ab326d0767c02fb9847b342c43ea58275c4b1680  
Date: 2025-12-02T03:59:29.283Z  
Electron: 37.7.0  
Chromium: 138.0.7204.251  
Node.js: 22.20.0  
V8: 13.8.258.32-electron.0  
OS: Linux x64 6.8.0-88-generic

### For AI issues: which model did you use?

Sonnet 4.5, Gemini 3 Pro

### Additional Information

- ✅ **The actual file content is CORRECT** when opened in editor
- ❌ Only **Cursor Chat rendering is broken**
- ⚠ **This is NOT an AI model issue** - the bug reproduces consistently across different AI models (Claude Sonnet, etc.)
- The bug substitutes entire code block content from one section into another
- This makes Chat completely unreliable for reviewing markdown documentation

### Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [December 4, 2025, 7:17pm UTC](https://forum.cursor.com/t/chat-renders-wrong-content-in-markdown-code-blocks-substitutes-sections/145269/2 "2025-12-04T19:17:02Z")

</div>

Hey, thanks for the report. We need more data to investigate.

Please check and share:

- A minimal markdown file that reproduces the issue, and how you send content to Chat (copy-paste, “attach file”, in parts, etc.)
- Export the problematic chat and check if the .md shows any substitution: chat menu → Export Chat ([Export | Cursor Docs](https://cursor.com/docs/agent/chat/export)). Attach the export
- The Request ID of a message where you see the substitution: chat menu → Copy Request ID. Guide: [Getting a Request ID | Cursor Docs](https://cursor.com/docs/troubleshooting/request-reporting)

Once you have these, attach the file here.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [December 26, 2025, 7:17pm UTC](https://forum.cursor.com/t/chat-renders-wrong-content-in-markdown-code-blocks-substitutes-sections/145269/3 "2025-12-26T19:17:04Z")

</div>

Closed on December 26, 2025, 7:17pm UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
