Markdown Review
Inline review comments for Markdown files. Open a .md file in the Markdown Review editor, select rendered text in the preview, and the extension drops <!-- mdr-comment ... --> / <!-- mdr-range-start ... --> HTML comments back into the source. The annotated file feeds straight into AI workflows (Claude Code / Cursor / etc.) as a revision brief — no proprietary side-channel, the comments live in the document.

Why
Reviewing AI-generated documents is awkward in plain VSCode: leaving notes in a separate file loses context, and inline TODOs clutter the prose. Markdown Review lets you mark up the rendered preview the way you'd mark up a draft on paper, while keeping the source machine-readable for the next round.
Features
- Custom Editor "Markdown Review" — surfaces in Open With…, file/editor right-click menus, and the command palette.
- Side-by-side preview + comment list — comments anchor to their highlighted span, prev/next nav jumps between them.
- Selection-driven comments — drag in the rendered preview, click 创建评论, type a single line, press Enter to save. Selections snap to safe boundaries so comments never split a Markdown construct (heading prefix, list bullet, fenced code).
- Char-precise highlighting — multiple comments can share a line; same-line non-overlapping selections coexist.
- Cross-line range comments — wrap whole rows when the selection spans paragraphs.
- Code-block / mermaid comments — select inside a fenced
``` / mermaid diagram and create one or more comments; entries collect under a single <!-- mdr-fence-comments --> block right after the closing fence.
- In-page find —
Cmd+F / Ctrl+F opens a Chrome-style floating bar. Enter / ↑↓ navigate matches; Esc closes and clears the highlights. Match colors are settable (yellow defaults, distinct from selection blue).
- Safe in tables and around inline HTML — comment text is backslash-escaped (
\|, \<, \>, \n, \r, \\) before writing, so a marker dropped inside a Markdown table cell or near inline HTML stays well-formed.
- Editable / deletable — edit text inline, deleting scrubs the markers from source.
- Plays nice with the ecosystem — reuses
markdown.markdownItPlugins and markdown.previewStyles contributions, so plugins like bierner.markdown-mermaid keep working.
Usage
- Open any
.md file. Right-click → Open With… → Markdown Review (or Markdown Review: Open in Review View from the command palette).
- Drag-select rendered text in the preview. A floating toolbar appears.
- Click 💬 创建评论 → type your note → Enter saves.
- The source markdown gains an
<!-- mdr-* --> marker pair around the selection. Open the file in plain text mode anytime to see it.
Line comment — scopes to the paragraph above:
This paragraph needs work.
<!-- mdr-comment id="c-3f2a9k7x": rewrite for clarity -->
Range comment — wraps a span of content:
<!-- mdr-range-start id="c-9b2cw7xa": tighten this section -->
... markdown content ...
<!-- mdr-range-end id="c-9b2cw7xa" -->
Fence comment — sits on the line after a closing fence, one or more entries per block:
```mermaid
graph TD
A --> B
```
<!-- mdr-fence-comments
id="c-abc12345": flip the arrow
id="c-def67890": rename A → Input
-->
Resolved comments are removed from the source (no status field — the source IS the truth).
Find in preview
Cmd+F (macOS) / Ctrl+F (Win/Linux) opens an in-page find bar at the top-right of the preview. Type to highlight matches (yellow), Enter / ↑↓ step through them, Esc closes and clears the highlights. The bar seeds itself from the current selection.
Settings
| Setting |
Default |
Effect |
markdownReview.highlight.selectionBackground |
rgba(64, 158, 255, 0.18) |
Comment chip background, idle |
markdownReview.highlight.selectionBorder |
rgba(64, 158, 255, 0.45) |
Comment chip border, idle |
markdownReview.highlight.activeBackground |
rgba(64, 158, 255, 0.32) |
Background when card is focused |
markdownReview.highlight.activeBorder |
rgba(64, 158, 255, 0.85) |
Border when card is focused |
markdownReview.find.background |
rgba(247, 188, 64, 0.30) |
Find hit background |
markdownReview.find.border |
rgba(247, 188, 64, 0.60) |
Find hit border |
markdownReview.find.activeBackground |
rgba(247, 154, 32, 0.50) |
Currently-focused find hit background |
markdownReview.find.activeBorder |
rgba(247, 154, 32, 0.90) |
Currently-focused find hit border |
All take any CSS color string (#hex, rgb(), var(--vscode-...)).
License
MIT. Source on GitHub. For development and contribution notes, see DEV.md.
| |