Markdown Editor (Experimental) Breaks When Markdown Metadata Is Present
- 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.130.0
- OS Version: 26.5.2
Steps to Reproduce:
1. Open a new Markdown file (`tmp.md`) in the VS Code Editor using the Experimental Markdown Editor view (`vscode.markdown.preview.editor`).
2. Paste the following YAML front matter containing nested lists and sub-objects at the top of the file:
```markdown
---
number: "01"
title: "title"
list:
- "one"
- "two"
double:
- first: "here"
second: here
- first: "here"
second: "here"
---
# Hello
* World
* This is me
```
### Actual Result (Editor View)
The editor breaks the structural YAML layout. It strips out the indentation, merges key-value boundaries, and turns the sub-lists into a confusing mix of flat bullet points and inline strings on a single line (e.g., rendering `number: "01" title: "title" list:` entirely on one compressed line, followed by malformed bullets).
Here's a screenshot of the Markdown Editor (Experimental) in edit mode:
### Expected Result
The block should either preserve its native YAML formatting structure inside the editor canvas, or cleanly inherit the exact rendering engine behavior used by the **Markdown Preview panel**, which cleanly separates and tables complex structural metadata.
Here's a screenshot of the Markdown Preview (not the Experimental Editor):
### Additional Context
The standard side-by-side Markdown Preview parses this identical snippet flawlessly. The layout breakdown is isolated exclusively to the Markdown Editor canvas implementation when interacting with nested YAML structures.
Contributor guide
Research direction
Reproduce the issue through the experimental Markdown Editor view, vscode.markdown.preview.editor, using the tmp.md YAML front matter example. Compare its edit-mode handling with the standard Markdown Preview panel, then trace the editor canvas behavior for nested YAML metadata. Done means the metadata keeps its YAML structure or matches the preview's correct rendering without breaking the document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100