Markdown preview in-document links still broken in 2.6.18 (TOC / fragment links)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In-document (fragment) links in markdown preview don’t work — e.g. table-of-contents links like [Section](#section) in a README. Clicking them either shows “The file is not displayed in the text editor because it is a directory” or “Unable to open ‘README.md’” / “The editor could not be opened because the file was not found.” In one workspace setup, clicking “Create File” then tried to create C:\README.md (operation not permitted).

Steps to Reproduce

  1. Open a repo that has a README.md with a table of contents (e.g. fragment links #section).
  2. Open the README in Cursor and switch to Preview (or open preview side-by-side).
  3. Click any in-document link (e.g. a TOC entry).
  4. Observe: link doesn’t scroll to the section; instead see “directory” or “file not found” (and in some setups, wrong path like C:\README.md).

Expected Behavior

Clicking an in-document link should scroll the preview (or editor) to the target heading, same as in VS Code and on GitHub.

Operating System

Windows 10/11
MacOS

Version Information

Version: 2.6.18 (user setup)
VSCode Version: 1.105.1
Commit: 68fbec5aed9da587d1c6a64172792f505bafa250
Date: 2026-03-10T02:01:17.430Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT arm64 10.0.26200

Additional Information

A previous thread (“Links in plan docs not clickable”) said the latest version fixed link issues; that may apply to Plan docs. In-document links in regular .md preview are still broken in 2.6.18.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. This is a known bug. Fragment links (#section) in the Markdown preview are handled incorrectly. Instead of scrolling to the right heading, the editor tries to open them as files.

Another user reported the same thing on macOS: Links of md files are not working on preview mode, so it’s cross-platform.

The team is aware. I can’t share an ETA yet, but your report helps with prioritization, especially the details about Windows behavior with paths like C:\README.md.

A post was merged into an existing topic: Links of md files are not working on preview mode