Skip to content

2.0.0

Compare
Choose a tag to compare
@rayd rayd released this 24 Jul 20:35
· 3 commits to master since this release

Handful of bug fixes:

A potentially breaking change was introduced with respect to the handling of whitespace, hence the major version number increase. By default, the parser will now collapse whitespace instead of ignoring whitespace-only text nodes. This follows along more closely with the HTML spec: https://www.w3.org/TR/html4/struct/text.html#h-9.1.

A new option has been added to the parse() function -- a second parameter can be passed as an options object. It currently supports one option ignoreWhitespace, which will provide behavior compatible to the old version of this library where we ignored all whitespace-only nodes. Check out this test for an example.