cmark

My personal build of CMark ✏️

Commit
9255a83189a50bef4302bdbfa9e2489871811797
Parent
307e453041f59ae1b18196865d85a4d64e9c8981
Author
John MacFarlane <jgm@berkeley.edu>
Date

Use new with Document and NodeWalker constructors.

Diffstat

2 files changed, 3 insertions, 3 deletions

Status File Name N° Changes Insertions Deletions
Modified js/lib/blocks.js 4 2 2
Modified js/lib/node.js 2 1 1
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
@@ -660,7 +660,7 @@ var Document = function() {
 
 // The main parsing function.  Returns a parsed document AST.
 var parse = function(input) {
-    this.doc = Document();
+    this.doc = new Document();
     this.tip = this.doc;
     this.refmap = {};
     if (this.options.time) { console.time("preparing input"); }
@@ -689,7 +689,7 @@ var parse = function(input) {
 // The DocParser object.
 function DocParser(options){
     return {
-        doc: Document(),
+        doc: new Document(),
         tip: this.doc,
         refmap: {},
         lastLineLength: 0,
diff --git a/js/lib/node.js b/js/lib/node.js
@@ -160,7 +160,7 @@ Node.prototype.insertBefore = function(sibling) {
 };
 
 Node.prototype.walker = function() {
-    var walker = NodeWalker(this);
+    var walker = new NodeWalker(this);
     return walker;
 };