summaryrefslogtreecommitdiff
path: root/js/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/index.js')
-rwxr-xr-xjs/lib/index.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/lib/index.js b/js/lib/index.js
index d0532c6..22a2184 100755
--- a/js/lib/index.js
+++ b/js/lib/index.js
@@ -13,11 +13,15 @@
var util = require('util');
-var renderAST = function(tree) {
- return util.inspect(tree.toAST(), {depth: 20}) + '\n';
-};
-
module.exports.Node = require('./node');
module.exports.DocParser = require('./blocks');
module.exports.HtmlRenderer = require('./html');
-module.exports.ASTRenderer = renderAST;
+module.exports.ASTRenderer = function(options) {
+ return {
+ render: function(tree) {
+ return util.inspect(tree.toAST(), null, 20,
+ this.options.colors) + '\n';
+ },
+ options: options || {}
+ };
+}