markdown-tree

This is a markdown to JSON tree converter for deno, based on rusty_markdown

Example

import { Node } from './mod.ts'
Node.from(`
# Foo
bar

baz
`)

Result: (converted to plain JSON)

{
  "children": [
    {
      "props": { "type": "heading", "level": 1 },
      "children": [{ "props": { "type": "text", "content": "Foo" } }]
    },
    {
      "props": { "type": "paragraph" },
      "children": [{ "props": { "type": "text", "content": "bar" } }]
    },
    {
      "props": { "type": "paragraph" },
      "children": [{ "props": { "type": "text", "content": "baz" } }]
    }
  ]
}