[md_ast] is a markdown parser that outputs an abstract syntax tree (AST). The underlying markdown engine is a Deno fork of a TypeScript fork of marked.
If you want to work with a typed markdown AST in TypeScript for Deno, but don't care about speed and inline HTML, this module is for you. It is currently based on this Deno fork of a markdown parser, where we override the HTML renderer with a JSON renderer. It is probably quite slow for large documents and does not support HTML. A better, faster, and focused syntax-tree implementation for markdown, such as unified, would be great, but we have to wait for unified Deno support.
This module demonstrates basic [md_ast] usage. Running it will output the AST of a simple markdown document as JSON.
deno run example.ts