- Commit
- eb6a4c5c5387dde76b9c9cef8260b5b70835e2cf
- Parent
- f738ede352ecb5f1128d2c74c36f7d20f9a1d08b
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Initialize more properties of Node. Even better performance!
My personal build of CMark ✏️
Initialize more properties of Node. Even better performance!
1 file changed, 5 insertions, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | js/lib/node.js | 6 | 5 | 1 |
diff --git a/js/lib/node.js b/js/lib/node.js @@ -78,6 +78,10 @@ function Node(nodeType, pos) { this.info = undefined; this.destination = undefined; this.title = undefined; + this.fence_char = undefined; + this.fence_length = undefined; + this.fence_offset = undefined; + this.level = undefined; } Node.prototype.isContainer = function() { @@ -165,7 +169,7 @@ Node.prototype.toAST = function() { var result = { t: this.t }; var propsToShow = ['t', 'c', 'list_data', 'string_content', - 'pos', 'tight', 'info']; + 'pos', 'tight', 'info', 'level']; for (var i = 0; i < propsToShow.length; i++) { var prop = propsToShow[i];