mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-26 00:12:28 +03:00
21 lines
579 B
JavaScript
Executable File
21 lines
579 B
JavaScript
Executable File
// 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*')));
|
|
|
|
var util = require('util');
|
|
|
|
var renderAST = function(tree) {
|
|
return util.inspect(tree, {depth: null});
|
|
};
|
|
|
|
module.exports.DocParser = require('./blocks');
|
|
module.exports.HtmlRenderer = require('./html-renderer');
|
|
module.exports.ASTRenderer = renderAST;
|