summaryrefslogtreecommitdiff
path: root/js/lib/index.js
blob: 3ded1df476c954049f491979dfcae06d3903afa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// commonmark.js - CommomMark in JavaScript
// Copyright (C) 2014 John MacFarlane
// License: BSD3.

// Basic usage:
//
// var commonmark = require('commonmark');
// var parser = new commonmark.DocParser();
// var renderer = new commonmark.HtmlRenderer();
// console.log(renderer.render(parser.parse('Hello *world*')));

"use strict";

var util = require('util');

var renderAST = function(tree) {
    return util.inspect(tree, {depth: null});
};

module.exports.Node = require('./node');
module.exports.DocParser = require('./blocks');
module.exports.HtmlRenderer = require('./html');
module.exports.ASTRenderer = renderAST;