aboutsummaryrefslogtreecommitdiff
path: root/js/lib/index.js
blob: 4c5d390fb4e6c55f7c8944a64be8574f8839a3aa (plain)
  1. // commonmark.js - CommomMark in JavaScript
  2. // Copyright (C) 2014 John MacFarlane
  3. // License: BSD3.
  4. // Basic usage:
  5. //
  6. // var commonmark = require('commonmark');
  7. // var parser = new commonmark.DocParser();
  8. // var renderer = new commonmark.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;