summaryrefslogtreecommitdiff
path: root/js/lib/node.js
AgeCommit message (Collapse)Author
2015-01-15Added getType(), setType() to node.js.John MacFarlane
Use these instead of direct property access. This is the first step in a general move towards an API like the one libcmark has. This will allow us to have a stable API that is independent of details of the AST.
2015-01-15Removed artificial distinction btw FencedCode, IndentedCodeJohn MacFarlane
in blocks.js.
2015-01-13Removed an implicit cast in node.js 'next'.John MacFarlane
2015-01-13Initialize fields in objects to null rather than undefined.John MacFarlane
Big speed boost.
2015-01-12Use new with Document and NodeWalker constructors.John MacFarlane
2015-01-11js: 'ListItem' -> 'Item'.John MacFarlane
2015-01-11node.js: toAST -> toObject.John MacFarlane
2015-01-11node.js: Added title and destination to list of props to show in toAST.John MacFarlane
2015-01-11node.js: use switch instead of if-else.John MacFarlane
2015-01-10Made Node a local variable.John MacFarlane
2015-01-10Made NodeWalker a regular function returning an object.John MacFarlane
2015-01-09Removed a redundant condition.John MacFarlane
2015-01-09Small optimization.John MacFarlane
2015-01-09Non-recursive version of toAST().John MacFarlane
Closes #272.
2015-01-09JS: Renamed 'c' property to 'literal' to match libcmark.John MacFarlane
2015-01-09JS: sourceloc -> sourcepos for confirmity with cmark.John MacFarlane
2015-01-09Replaced 'pos' with 'sourceloc', making it an array.John MacFarlane
This is a more compact representation.
2015-01-09Don't include string_content in output of toAST().John MacFarlane
2015-01-09Don't initialize strings, string_content to defined value.John MacFarlane
2015-01-09Made `tight` a property of `list_data`.John MacFarlane
2015-01-09Initialize more properties of Node. Even better performance!John MacFarlane
2015-01-09Initialize more fields in Node. Better performance.John MacFarlane
2015-01-09Initialize more fields in Node.John MacFarlane
This helps with performance.
2015-01-09Removed makeBlock. Use new Node directly. Initialize more fields.John MacFarlane
2015-01-09JS linter cleanups.John MacFarlane
2015-01-09Use linked list instead of arrays for AST.John MacFarlane
Use the same doubly linked node structure that cmark uses. The primary advantages of this change are (a) simplified code, especially in the renderers, and (b) elimination of the need for recursion, so we can render deeply-nested structures without a stack overflow. A node walker has also been added, for easy AST traversal. * Added js/lib/node.js for nodes. Includes a node walker. * All modules updated to use node structures. * Regularized position information into pos property. * Performance is slightly worse than before, but only marginally, and no doubt there are more optimizations that can be done.