Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
In Cursor’s in-editor Markdown Preview (the Markdown/Preview toggle, not Ctrl+Shift+V), empty lines appear before each ## and ### heading even though those blank lines are not in the Markdown source.
As soon as I type even a single character in Preview, those displayed empty lines are written into the Markdown source. That creates many consecutive blank lines and triggers Markdownlint MD012 (“Multiple consecutive blank lines”).
This looks related to known WYSIWYG re-serialization issues (e.g. preview altering front matter / stripping HTML / corrupting bold+code), but I could not find a report for this specific “extra blank lines before headings → written to source on edit → MD012” case.
Steps to Reproduce
- Open a Markdown file with ## / ### headings and no consecutive blank lines before those headings (for example a daily task status notes file).
- Switch from Markdown to Preview using the in-editor toggle.
- Observe empty lines shown before each ## and ### heading in Preview, even though they are not in the source.
- In Preview, type a single letter anywhere in the document.
- Switch back to Markdown (source) and inspect the file / Markdownlint.
Expected Behavior
Preview should not invent blank lines that are not in the source. Editing in Preview should not insert those blank lines into the Markdown file. Source before and after a trivial Preview edit should match aside from the intentional change.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Version Information
3.13.25 (user setup)
Additional Information
- Affects day-to-day Markdown notes (e.g. task status files).
- Classic preview via Ctrl+Shift+V does not rewrite the file; the problem is the in-editor WYSIWYG Preview.
- Workaround: avoid editing in Preview; use source mode or classic side preview.
- Related acknowledged threads (same Preview serializer class of bugs, different symptoms):
- Bug Report: Preview Mode Strips Content and Formatting When Switching Back to Markdown Mode
- /t/the-markdown-preview-in-the-cursor3-agent-window-causes-formatting-issues-in-markdown-files/157009
- /t/saving-in-markdown-preview-mode-corrupts-bold-inline-code-formatting-backtick-order/162540
Does this stop you from using Cursor
No - Cursor works, but with this issue


