Skip to content
obsidian-markdown-parser logo

obsidian-markdown-parser

Obsidian-flavoured markdown, measured against the live app - the editor's class tokens, the syntax as Lezer, micromark/mdast and markdown-it extensions, and the metadata worker's CachedMetadata.

The editor's classes

The CSS classes Obsidian’s editor puts on every character and line, so themes keep working, resumable from any line and hosted as a CodeMirror 6 language.

The syntax, defined once

Wikilinks, embeds, tags, comments, math, callouts, block ids, highlights and footnotes, as extensions for Lezer, micromark/mdast and markdown-it, checked against one corpus.

CachedMetadata

parseMetadata gives the metadata worker’s CachedMetadata, equal as JSON, also published alone as @mnaoumov/obsidian-markdown-parser-metadata.

Measured, not copied

Every behaviour is matched against a real Obsidian instance through pinned oracles, never copied from the app’s code.