summaryrefslogtreecommitdiff
path: root/js/lib/html.js
AgeCommit message (Collapse)Author
2015-01-15Provide getters and setters for public properties of Node.John MacFarlane
Everything else gets a name starting with an underscore and will be considered private. This will allow us to keep the API stable while changing the underlying data structure. And it will avoid exposing properties that have only an instrumental value in parsing.
2015-01-15Rename sourcepos -> _sourcepos, added sourcepos() accessor.John MacFarlane
2015-01-15Removed setType(), replaced getType() with type().John MacFarlane
2015-01-15Removed vestigial ReferenceDef node type.John MacFarlane
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-12html.js, xml.js: avoid using concat.John MacFarlane
2015-01-12Fixed some linter errors.John MacFarlane
2015-01-11Moved common xml escaping code from xml.js, html.js to common.js.John MacFarlane
2015-01-11js: 'ListItem' -> 'Item'.John MacFarlane
2015-01-10Added options to DocParser.John MacFarlane
So far only 'time' is supported. 'time' now gives a breakdown of block parsing, inline parsing, and rendering. Currently the ratio is block parsing: 725ms inline parsing: 332ms rendering: 213ms so perhaps block.js is the best place to look for further optimizations.
2015-01-10Removed a redundant clause from switch statement.John MacFarlane
Lines starting
2015-01-10Made 'options' a parameter of the renderer constructors...John MacFarlane
as opposed to the 'render' function. Added a 'colors' parameter for the ast renderer.
2015-01-10html.js: removed blocksep and innersep, no longer used.John MacFarlane
2015-01-10HTML renderer: throw error on unknown tag type.John MacFarlane
This indicates a programming error.
2015-01-10Put another regex in a variable.John MacFarlane
2015-01-10HTML renderer: Test for characters that need escaping before substituting.John MacFarlane
2015-01-10More HTML rendering efficiency improvements.John MacFarlane
2015-01-10Don't use array buffer in HTML rendering.John MacFarlane
Use straight string `+=` instead. This is supposedly faster in browsers other than IE 7.
2015-01-09Use a switch instead of if-then-else.John MacFarlane
2015-01-09JS: Renamed 'c' property to 'literal' to match libcmark.John MacFarlane
2015-01-09Added options to render, implemented sourcepos option.John MacFarlane
This adds data-sourcepos attributes on block-level tags in the HTML output. Also added `--sourcepos` command-line option to `js/bin/commonmark`.
2015-01-09JS: use c rather than string_content property for code blocks, html.John MacFarlane
string_content is just for the raw string content that will be parsed as inlines, not for the 'real' content of the block element.
2015-01-09Rewrote HTML escaping for big performance gain.John MacFarlane
2015-01-09Made `tight` a property of `list_data`.John MacFarlane
2015-01-09JS linter improvements.John MacFarlane
(Note: this is helping performance. We have regained everything we lost with the last major change, and more.)
2015-01-09Rename js/lib/html-renderer.js -> js/lib/html.js.John MacFarlane