cmark

My personal build of CMark ✏️

Commit
2ecc11ea86b1d220f8d089a1680307a35437f6ef
Parent
e44eb21a558f6b80c0c038602baf77223709f1d9
Author
John MacFarlane <jgm@berkeley.edu>
Date

Renamed .t to ._type to mark it as "hidden."

Diffstat

1 file changed, 4 insertions, 4 deletions

Status File Name N° Changes Insertions Deletions
Modified js/lib/node.js 8 4 4
diff --git a/js/lib/node.js b/js/lib/node.js
@@ -1,7 +1,7 @@
 "use strict";
 
 function isContainer(node) {
-    switch (node.t) {
+    switch (node._type) {
     case 'Document':
     case 'BlockQuote':
     case 'List':
@@ -63,7 +63,7 @@ var NodeWalker = function(root) {
 };
 
 var Node = function(nodeType, sourcepos) {
-    this.t = nodeType;
+    this._type = nodeType;
     this.parent = null;
     this.firstChild = null;
     this.lastChild = null;
@@ -90,7 +90,7 @@ Node.prototype.isContainer = function() {
 };
 
 Node.prototype.type = function() {
-    return this.t;
+    return this._type;
 };
 
 Node.prototype.appendChild = function(child) {
@@ -221,7 +221,7 @@ module.exports = Node;
  var event;
 
  while (event = walker.next()) {
- console.log(event.entering, event.node.t);
+ console.log(event.entering, event.node.type());
  }
 
  */