md-mdast
v3.4.0
Published
Tiny but fast Markdown to AST parser
Downloads
54
Readme
md-mdast
- Markdown to MDAST converter.
- Small and fast.
- No dependencies.
Installation
npm install md-mdast
Usage
const {create} = require('md-mdast');
const parser = create();
console.log(parser.tokenizeBlock('*hello* __world__'));
Result:
{ type: 'root',
children:
[ { type: 'paragraph',
children:
[ { type: 'emphasis',
children: [ { type: 'text', value: 'hello' } ] },
{ type: 'text', value: ' ' },
{ type: 'strong',
children: [ { type: 'text', value: 'world' } ] } ] } ],
}
License
Unlicense — public domain.