Convert markdown to notion v2 blocks.
import { markdownToBlocks } from '@utisam/marton';
const blocks = markdownToBlocks(`
# Test
* aaa
* bbb
`.trim());
console.log(JSON.stringify(blocks, null, " "));file(vfile.Compatible) — virtual file representing the input documentoption(Option) — virtual file representing the input document
Array of Notion Block object.
file(vfile.Compatible) — virtual file representing the input documentoption(Option) — virtual file representing the input document
Array of Notion Rich Text object.
logWarn?((string) => void) — Callback to print warning logs.toMarkdown?((Nodes) => string) — Callback to convert markdown to plain text.unsupportedError?(boolean) — Error will be thrown when an unimplemented Markdown syntax was found.
root(mdast.Root) — virtual file representing the input documentoption(Option) — virtual file representing the input document
Iterable of Notion Block object.
root(mdast.Root) — virtual file representing the input documentoption(Option) — virtual file representing the input document
Iterable of Notion Rich Text object.