aboutsummaryrefslogtreecommitdiff
path: root/js/lib/index.js
blob: 4e0453251318a00135e995adcd4ae5e1322c5896 (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. "use strict";
  11. var util = require('util');
  12. var renderAST = function(tree) {
  13. return util.inspect(tree, {depth: null});
  14. };
  15. module.exports.DocParser = require('./blocks');
  16. module.exports.HtmlRenderer = require('./html-renderer');
  17. module.exports.ASTRenderer = renderAST;