markdown-it-ast
Generate AST from tokens parsed from markdown-it.
Last updated 8 years ago by andy0130tw .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install markdown-it-ast 
SYNC missed versions from official npm registry.

Markdown-It AST Generator

Generate AST from tokens parsed from markdown-it to be more efficient on searching and rewriting tokens.

Usage

var markdownIt    = require('markdown-it');
var markdownItAST = require('markdown-it-ast');

var tokens = markdownIt.parse('#123\n##456');
markdownItAST.makeAST(tokens);

Structure

makeAST returns a tree. Each token pair (open, close) are stored in openNode and closeNode, respectively. nodeType is derived from the opening token. Descendants are stored in children, can be either a node on AST or an inline node.

License

This project was [licensed under MIT]((https://github.com/andy0130tw/markdown-it-ast/LICENSE).

Current Tags

  • 0.0.1                                ...           latest (8 years ago)

1 Versions

  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |