- TypeScript 72%
- HTML 15%
- CSS 11%
- JavaScript 2%
Mirrordown #
A collection of markdown-it plugins, remark plugins, Sätteri plugins, and VSCode Markdown Preview extensions that add extended syntax support for semantic HTML elements — each syntax implemented as a matched set so markdown-it, unified (remark) and Sätteri pipelines render identically.
📦 Packages #
Each feature is implemented as a matched set: a markdown-it plugin, a remark/rehype plugin for unified pipelines, a Sätteri plugin (the Rust markdown processor behind Astro's @astrojs/markdown-satteri), and (usually) a VSCode extension for live preview support. The mdit-*, remd-* and sat-* plugins emit byte-identical HTML for the same input. Where Sätteri parses a syntax itself, the table names its built-in feature instead of a package.
Presets #
To use the whole suite, install one preset instead of each plugin: every feature on by default, any of them switched off with false.
| Ecosystem | Package | Usage |
|---|---|---|
| markdown-it | preset-markdown-it | md.use(mirrordown) |
| remark / rehype | preset-remark | unified(mirrordown()) (Astro), or unified |
| Sätteri | preset-satteri | satteri(mirrordown()) (Astro), or markdownToHtml |
Inline elements #
| Syntax | HTML | markdown-it | remark | Sätteri | VSCode |
|---|---|---|---|---|---|
--delete-- |
<del> |
mdit-del | remd-del | sat-del | markdown-del |
++insert++ |
<ins> |
mdit-ins | remd-ins | sat-ins | markdown-ins |
==mark== |
<mark> |
mdit-mark | remd-mark | sat-mark | markdown-mark |
[[kbd]] |
<kbd> |
mdit-kbd | remd-kbd | sat-kbd | markdown-kbd |
H~2~O |
<sub> |
mdit-sub | remd-sub | built-in subscript |
markdown-sub |
31^st^ |
<sup> |
mdit-sup | remd-sup | built-in superscript |
markdown-sup |
*[term]: Title |
<abbr> |
mdit-abbr | remd-abbr | sat-abbr | markdown-abbr |
{本|ほん} |
<ruby> |
mdit-ruby | remd-ruby | sat-ruby | markdown-denden-furigana |
||spoiler|| |
click-to-reveal (no JS) | mdit-spoiler | remd-spoiler | sat-spoiler | markdown-spoiler |
Block & structural #
| Syntax | HTML | markdown-it | remark | Sätteri | VSCode |
|---|---|---|---|---|---|
Term: Definition |
<dl> |
mdit-definition-list | remd-definition-list | built-in definitionList |
markdown-definition-list |
> [!NOTE] |
Alert callout | mdit-github-alerts | remd-github-alerts | sat-github-alerts | markdown-github-alerts |
@1. Step |
<ol> |
mdit-steps | remd-steps | sat-steps | markdown-steps |
% Tab |
CSS-only tabs | mdit-tabs | remd-tabs | sat-tabs | markdown-tabs |
## Heading → wrap |
<section> |
mdit-sectionize | remd-sectionize | sat-sectionize | markdown-sectionize |
(empty <p>) → removed |
dropped empty paragraphs | mdit-squeeze-paragraphs | remd-squeeze-paragraphs | sat-squeeze-paragraphs | markdown-squeeze-paragraphs |
~: caption after a block |
<figure> + <figcaption> |
mdit-caption | remd-caption | sat-caption | markdown-caption |
Attributes #
| Syntax | HTML | markdown-it | remark | Sätteri | VSCode |
|---|---|---|---|---|---|
{.class #id} |
Element attributes | mdit-attrs | remd-attrs | built-in attributes |
markdown-attrs |
Images #
| Syntax | HTML | markdown-it | remark | Sätteri | VSCode |
|---|---|---|---|---|---|
 |
inlined <svg> |
mdit-inline-svg | remd-inline-svg | sat-inline-svg | markdown-inline-svg |
! |
<dialog> |
mdit-lightbox | remd-lightbox | sat-lightbox | markdown-lightbox |
standalone ![]() |
unwrapped <img> |
mdit-unwrap-images | remd-unwrap-images | sat-unwrap-images | markdown-unwrap-images |
Diagrams #
| Syntax | HTML | markdown-it | remark | Sätteri | VSCode |
|---|---|---|---|---|---|
```mermaid |
inline <svg> (no JS) |
mdit-mermaid-pele | remd-mermaid-pele | sat-mermaid-pele | markdown-mermaid-pele |
Headings #
| Syntax | HTML | markdown-it | remark | Sätteri | VSCode |
|---|---|---|---|---|---|
## Heading → id |
heading id slug |
mdit-slug | remd-slug | sat-slug | — |
## Heading → link |
<a> |
mdit-autolink-headings | remd-autolink-headings | sat-autolink-headings | markdown-autolink-headings |
All VSCode extensions are also bundled together in the Markdown Preview Extended Syntax pack. Heading slugs are provided in the preview by the Heading Anchors extension (and by VSCode's own built-in heading ids), so
slughas no standalone extension.
🔧 Local Development #
This project uses Vite+ (vp), a unified toolchain that wraps Vite, Vitest, Oxlint, Oxfmt, and more under a single CLI. Install it globally before getting started. Vite+ will automatically use the preferred package manager for this project (Yarn).
Install dependencies:
vp install
Run all checks (format, lint, type-check):
vp run --filter "./packages/**" build
vp check
The type check reads each workspace package's built types, so build first (after a fresh checkout, or when you change a package another one imports). An unbuilt package doesn't fail the check; its types quietly become any.
Run tests:
vp test
Build all packages:
vp run -r build
📣 Acknowledgements #
The plugins in this collection are forked and modernized from the following upstream projects:
- markdown-it-ins — original
<ins>plugin for markdown-it - markdown-it-mark — original
<mark>plugin for markdown-it - markdown-it-abbr — original
<abbr>plugin for markdown-it - @mdit/plugin-del —
<del>plugin for markdown-it - @mdit/plugin-kbd —
<kbd>plugin for markdown-it - @mdit/plugin-sub —
<sub>plugin for markdown-it - @mdit/plugin-sup —
<sup>plugin for markdown-it - markdown-it-ruby —
<ruby>plugin for markdown-it - remark-ins —
<ins>plugin for remark - remark-mark —
<mark>plugin for remark - remark-supersub —
<sup>/<sub>plugins for remark - remd-ruby —
<ruby>plugin for remark - rehype-slug — heading
idslugs for rehype - rehype-autolink-headings — heading anchor links for rehype
- remark-sectionize —
<section>heading wrappers for remark - remark-squeeze-paragraphs — empty-paragraph removal for remark
- rehype-mermaid — the API and test cases
mermaid-pelefollows; Pele renders the diagrams
🥂 License #
Released under the MIT license © Drake Costa.