diff options
Diffstat (limited to 'js/lib/index.js')
-rwxr-xr-x | js/lib/index.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/lib/index.js b/js/lib/index.js new file mode 100755 index 0000000..cfb8bf9 --- /dev/null +++ b/js/lib/index.js @@ -0,0 +1,20 @@ +// stmd.js - CommomMark in JavaScript +// Copyright (C) 2014 John MacFarlane +// License: BSD3. + +// Basic usage: +// +// var stmd = require('stmd'); +// var parser = new stmd.DocParser(); +// var renderer = new stmd.HtmlRenderer(); +// console.log(renderer.render(parser.parse('Hello *world*'))); + +var util = require('util'); + +var renderAST = function(tree) { + return util.inspect(tree, {depth: null}); +} + +module.exports.DocParser = require('./blocks'); +module.exports.HtmlRenderer = require('./html-renderer'); +module.exports.ASTRenderer = renderAST; |