Parse Markdown to AST with location info.
This library is not parser itself, it dependent on wooorm/remark.
Markdown -> remark -> markdown-to-ast ->
The AST consists of
TxtNode of the AST has following properties:
loc- Nodes have line and column-based location info.
range- Nodes have an index-based location range (array).
raw- Node have a
value- Node have a
The interface are defined in textlint/txtnode.md
This library is a part of textlint/textlint.
If you need to markdown parser, please use wooorm/remark directly.
npm install @textlint/markdown-to-ast
var parse = require.parse;var markdown = "It's a *text*";var AST = parse;/**/
If you want to know real use-case, please see textlint/textlint.
See tools/ directory.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D