Rendered Markdown in Source Control injects diff markup into Mermaid code blocks, causing parse errors
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes
* VS Code Version: 1.134.0 (Universal)
* OS Version: macOS Tahoe 26.5.2
Steps to Reproduce:
1. Create a Markdown file containing:
````markdown
# Mermaid diff test
```mermaid
erDiagram
USER ||--o{ TEAM: "have"
USER ||--o{ TEAM_MEMBER : "belongs to"
```
````
2. Commit the file to Git.
3. Delete `USER ||--o{ TEAM_MEMBER : "belongs to"`
4. Open the changed Markdown file from the Source Control view.
5. Switch the diff editor from **Text Diff Editor** to **Markdown Preview**.
6. Mermaid diagram fails to render with a parse error.
```text
Parse error on line 3:
...||--o{ TEAM: "have"
Rendered Markdown diff: Mermaid reports a parse error containing `` markup
Contributor guide
Assessment
This issue has not been assessed yet.