diff options
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/blocks.js | 8 | ||||
-rwxr-xr-x | js/lib/index.js | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js index ce81fd9..476eb28 100644 --- a/js/lib/blocks.js +++ b/js/lib/blocks.js @@ -83,7 +83,7 @@ var stripFinalBlankLines = function(lns) { // DOC PARSER -// These are methods of a DocParser object, defined below. +// These are methods of a Parser object, defined below. // Returns true if parent block can contain child block. var canContain = function(parent_type, child_type) { @@ -679,8 +679,8 @@ var parse = function(input) { }; -// The DocParser object. -function DocParser(options){ +// The Parser object. +function Parser(options){ return { doc: new Document(), tip: this.doc, @@ -702,4 +702,4 @@ function DocParser(options){ }; } -module.exports = DocParser; +module.exports = Parser; diff --git a/js/lib/index.js b/js/lib/index.js index d78a5b2..86eea71 100755 --- a/js/lib/index.js +++ b/js/lib/index.js @@ -7,11 +7,11 @@ // Basic usage: // // var commonmark = require('commonmark'); -// var parser = new commonmark.DocParser(); +// var parser = new commonmark.Parser(); // var renderer = new commonmark.HtmlRenderer(); // console.log(renderer.render(parser.parse('Hello *world*'))); module.exports.Node = require('./node'); -module.exports.DocParser = require('./blocks'); +module.exports.Parser = require('./blocks'); module.exports.HtmlRenderer = require('./html'); module.exports.XmlRenderer = require('./xml'); |