Markdown support — what MD View renders

Full reference for the markdown flavors MD View renders: GFM, tables, KaTeX math, Mermaid diagrams, callouts, wiki-links, and YAML front-matter.

Last updated

MD View renders a superset of CommonMark with practical extensions for the kind of markdown people actually write. This page is the reference: what’s supported, how to use it, and the few things we intentionally don’t render.

Core (CommonMark + GFM)

CommonMark is the base. On top of that, MD View ships GitHub-flavored markdown:

  • Tables with column alignment.
  • Task lists- [ ] and - [x]. Checkboxes render but are not editable (viewer, not editor).
  • Strikethrough with ~~text~~.
  • Autolinkshttps://example.com becomes a link without needing <> brackets.
  • Fenced code blocks with language tags for syntax highlighting.
// Highlighted via highlight.js
function greet(name) {
  return `Hello, ${name}`;
}

Math (KaTeX)

Inline math with $...$, block math with $$...$$:

The Euler identity: $e^{i\pi} + 1 = 0$.

$$
\int_0^\infty e^{-x^2} \, dx = \frac{\sqrt{\pi}}{2}
$$

KaTeX renders deterministically and quickly — math doesn’t re-flow on resize and doesn’t depend on a network call.

Mermaid diagrams

Fenced code with the language mermaid:

```mermaid
flowchart LR
  A[Markdown] --> B[Render pipeline]
  B --> C[HTML]
  C --> D[WebView2]
```

Mermaid is lazy-loaded — the library fetches on the first diagram in a session. Subsequent diagrams render from the already-loaded runtime.

YAML front-matter

Three-dash YAML at the top of the file is parsed and stripped from the rendered output:

---
title: My doc
author: Jane
date: 2026-05-01
---

The metadata card (Ctrl+Shift+M) shows the parsed front-matter as a small panel at the top of the view. Toggle on/off as you like; default is off.

Callouts (GitHub-style)

GitHub’s > [!NOTE] / [!WARNING] / [!TIP] / [!IMPORTANT] / [!CAUTION] callouts render with colored bars and icons:

> [!NOTE]
> Useful information that doesn't change the flow.

> [!WARNING]
> A real heads-up.

Inside a workspace, [[other-doc]] and [[other-doc#section]] resolve to other markdown files in the tree:

See [[architecture#render-pipeline]] for details.

Outside a workspace (single-file mode), wiki-links render as plain text — there’s no project context to resolve them against.

Footnotes

GFM-style footnotes:

This is a claim.[^1]

[^1]: With a footnote.

Footnotes render as numbered superscripts in the body and a list at the bottom of the document.

Definition lists

Term
:   Definition

Another
:   Another definition

What we don’t render

  • Inline HTML beyond a small safe-list. The renderer pipes through DOMPurify before mounting; arbitrary <script>, <style>, iframes etc. are stripped. A small set of common formatting tags (<kbd>, <sup>, <sub>, <details>, <summary>) renders through.
  • Pandoc-style raw blocks ({=html}, {.class}). Those exist for cross-format conversion; for a viewer they’re noise.
  • Custom directive syntax (:::tip, [note], etc.). Different authoring tools invented different conventions; we standardized on GitHub callouts because they’re the most widely supported.

Highlights worth knowing

  • Heading anchors auto-generate from the heading text. ## API Endpoints becomes #api-endpoints. Internal links to those anchors work in the viewer and persist into PDF export.
  • Code blocks support copy-to-clipboard — hover the block and click the copy icon.
  • Images open in a lightbox on click. / step between images in the document.
  • Print-friendly fallback. <kbd> becomes proper boxed type; callouts keep their tint at low contrast for paper.

See also