Markdown Preview causes “Cursor Helper (Renderer)” to spike to 100% CPU and crash.
Minimal Reproduction
Create a file with this exact content and open Markdown Preview:
# Test
```go
type A struct {
Options map[string]interface{} `json:"options" yaml:"options"`
}
```
Root Cause
The combination of interface{} (curly braces) followed by a backtick struct tag
containing a space (dual tag like json:"x" yaml:"y") triggers the crash.
These variations do NOT crash:
interface{} + single tag (no space): OK
any + dual tag (no curly braces): OK
string + dual tag (no curly braces): OK
Environment
Cursor: 2.6.13
OS: macOS arm64, Darwin 25.3.0
All Markdown extensions disabled (confirmed not extension-related)
Steps to Reproduce
Crash Test
type A struct {
Options map[string]interface{} `json:"options" yaml:"options"`
}
Hey, great bug report. The minimal repro and the root cause analysis are really helpful.
This looks like a regex hang in the Markdown lexer. The combo of curly braces from interface{} followed by backtick struct tags with spaces likely triggers catastrophic backtracking in the renderer’s regex engine.
I’ve flagged this with the team. No ETA yet, but the detailed repro you shared will help a lot with prioritization.
As a workaround for now, you can use any instead of interface{} in Markdown code blocks, since you confirmed that doesn’t trigger the crash. Not ideal, but it should unblock you.