Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

3.0.0 : use mdast instead of CommonMark

Compare
Choose a tag to compare
@azu azu released this 17 Feb 00:36
· 2 commits to 301_moved_permanently since this release

use mdast instead of CommonMark by azu · Pull Request #3 · azu/markdown-to-ast

markdown-to-ast 3.x use wooorm/mdast instead of jgm/commonmark.js as Markdown parser.

Breaking Changes

markdown-to-ast 3.0.0 has some breaking changes.

Breaking Change:

use mdast instead of CommonMark

Break CommonMark dependent.
If you have used CommonMark-dependent code, it may be broken.

CodeBlock Node

before:

CodeBlock.raw have not contain CodeBlock mark like ```

var code = 1;

after:

CodeBlock.raw have contain CodeBlock mark like ```

The raw value of CodeBlock node is following:

```
var code = 1;
```

if you want to get only code value, can get from node.vaule.

Alt text of Image Node

before(CommonMark):

Alt text of Image node is Str node.

after(mdast):

Alt text of Image node is not Str node.
It is true that Alt text is a attribute of Image Node.