diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 12:56:03 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 12:56:03 -0800 |
commit | eb6a4c5c5387dde76b9c9cef8260b5b70835e2cf (patch) | |
tree | 66dedd729d9cfed71a0f2b1d190c3eaae908d8ac /js/lib | |
parent | f738ede352ecb5f1128d2c74c36f7d20f9a1d08b (diff) |
Initialize more properties of Node. Even better performance!
Diffstat (limited to 'js/lib')
-rw-r--r-- | js/lib/node.js | 6 |
1 files changed, 5 insertions, 1 deletions
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]; |