marked-ast
A modified version of marked that can produce an abstract syntax tree for Markdown.
Usage
var marked = ;var ast = marked;var html = marked;
The package is just a wrapper for marked
, so the produced HTML should be identical (if it isn't it's a bug). The AST produced in the example would look like this:
Development
Basic setup:
git clone https://github.com/pdubroy/marked-ast.gitcd marked-astnpm installgit submodule update --init
Running Tests
Use npm test
to run the tests. Before checking code in, run npm run prepublish
.
Updating Marked
To update to a new version of marked:
cd third_party/markedgit checkout <REF> # E.g., `git checkout v0.3.3` cd ../..npm run rewrite && npm test