md-mdast

Tiny but fast Markdown to AST parser

14 个版本
安装
npm install md-mdast
yarn add md-mdast
pnpm add md-mdast
bun add md-mdast
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.

版本列表
3.4.0 2020-04-19
3.3.0 2019-09-11
3.2.0 2019-04-23
3.1.1 2019-03-11
3.1.0 2019-02-25
3.0.0 2019-02-25
2.2.0 2019-02-24
2.1.0 2019-02-24
2.0.1 2019-02-23
2.0.0 2018-10-20
1.2.0 2018-06-11
1.1.0 2018-06-09
1.0.1 2018-06-08
1.0.0 2018-06-08