aboutsummaryrefslogtreecommitdiff
path: root/js/lib/index.js
blob: cfb8bf9066e75f5e7fe020ed9b647e5767d65f01 (plain)
  1. // stmd.js - CommomMark in JavaScript
  2. // Copyright (C) 2014 John MacFarlane
  3. // License: BSD3.
  4. // Basic usage:
  5. //
  6. // var stmd = require('stmd');
  7. // var parser = new stmd.DocParser();
  8. // var renderer = new stmd.HtmlRenderer();
  9. // console.log(renderer.render(parser.parse('Hello *world*')));
  10. var util = require('util');
  11. var renderAST = function(tree) {
  12. return util.inspect(tree, {depth: null});
  13. }
  14. module.exports.DocParser = require('./blocks');
  15. module.exports.HtmlRenderer = require('./html-renderer');
  16. module.exports.ASTRenderer = renderAST;