From eb6a4c5c5387dde76b9c9cef8260b5b70835e2cf Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 9 Jan 2015 12:56:03 -0800 Subject: Initialize more properties of Node. Even better performance! --- js/lib/node.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/lib') diff --git a/js/lib/node.js b/js/lib/node.js index 81bda05..5f82eca 100644 --- 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]; -- cgit v1.2.3