Skip to content

yunwuxin/markdown-it-ast

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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) is stored in openNode and closeNode, respectively. nodeType is derived from the opening token. Descendants are stored in children, and each descendant can be either an AST node or an inline node.

License

This project is licensed under MIT.

About

Generate AST from tokens parsed from markdown-it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%