Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When switching between Markdown preview mode and edit mode in Cursor IDE, the in-place preview toggle permanently strips or alters content: HTML comments, HTML elements (e.g. page-break divs), and underscore placeholder lines. Table formatting may also be altered. Changes are written to disk without warning. Verifiable via git diff. See Additional Information for examples.
Steps to Reproduce
- Open a Markdown file containing HTML comments, inline HTML (e.g. page-break divs), underscore placeholders (
_______________________________________________________________________________), or custom table alignment. See Additional Information for example syntax. - Switch to preview mode using the in-place preview toggle (magnifying glass icon).
- Switch back to edit mode (raw Markdown).
- Save the file (or rely on auto-save).
- Compare with
git diff— content is stripped or altered.
Expected Behavior
The file content should be identical before and after toggling. The preview should be a read-only view. No user-authored content (HTML comments, HTML elements, placeholders) should be removed or altered.
Operating System
Windows 10/11
Version Information
Version: 2.6.11 (user setup)
VSCode Version: 1.105.1
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990
Date: 2026-03-03T18:57:48.001Z
Build Type: Stable
Release Track: Early Access
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
Additional Information
Example diff (HTML comments stripped):
- <!-- @review: verify this section before finalizing -->
-
## Next Section
Example (underscore placeholders replaced with —):
- _______________________________________________________________________________
+ ---
Workaround: Avoid in-place preview toggle for files with HTML/comments/placeholders; use classic side-pane preview (Ctrl+Shift+V). Keep files under version control.
Does this stop you from using Cursor
No - Cursor works, but with this issue