Releases: fb55/htmlparser2
Releases · fb55/htmlparser2
v7.0.0
[email protected]
changes a lot of internals, resulting in an 20% overall performance improvement in AndreasMadsen's htmlparser-benchmark.
Breaking changes:
- Fixed how start & end index positions are calculated (#910) 5ab080e
- Some indices, especially end indices, will now have changed. Most importantly, end indices will now always be greater or equal than start indices (whoops!).
Features:
Refactors:
- Use a trie to decode HTML & XML entities in the tokenizer (#863) 9a47a55
- Leads to large speed-ups when dealing with entities.
- Iterate over char codes in the tokenizer (#894) f5aed75
- Improved tokenizer performance by ~40%.
- Use
Map
foropenImpliesClose
in the parser (#911) 39a8109 - Moved logic of
FeedHandler
to a function (#912) 3a672ff
v6.1.0
v6.0.1
- Fix parsing special closing tags (#746) 214ab08
- Thanks to @BenoitZugmeyer for the report (#745)!
v6.0.0
Breaking:
- Bump domhandler, domutils 4dd4233 0d278fd
- The new version of domhandler now comes with an actual root element for the document. This might break tests in a few cases. See the domhandler release notes for more details.
- Make some private properties actually private 1c71e60
Features:
- Add a
parseDocument
method 4653f23- This returns the root node of the document, instead of an array of the first nodes. You likely want to use this instead of the now deprecated
getDOM
method.
- This returns the root node of the document, instead of an array of the first nodes. You likely want to use this instead of the now deprecated
- Improve docs df7ea98 1ce1d3b 0437d9c
Minor:
- FeedHandler: Slightly restructure code b6b4382
v5.0.1
v5.0.0
Breaking changes:
- Default the
decodeEntities
option totrue
8ac01e0 - Removes underscores in front of many private properties & methods. 6e296d2
- Removes
EVENTS
,WritableStream
andCollectingHandler
exports from module import. The latter two are still part of the module, but now have to be imported explicitly. 6e296d2 - The parser no longer extends
EventEmitter
f30f13c - HTML
<title>
tag content is now processed as text (#483 by @billneff79) 0189e56
Features:
- Add media content parsing to FeedHandler (#560 by @gcandal) a85e4e0
- Expose the quotes that were used in the
onattribute
event 3c86256 - Add "sideEffects: false" to package.json (#474 by @ericjeney) d90dd64
- Explain stream usage in README (#446 by @mnmkng) 4c0fba8
Bug Fixes:
- Properly back out of numeric entities, decode entities in attributes (fixes #276) eaf2872
- Fix broken parsing after self-closing special tags (#515 by @warriordog) 4ec596f
- Fix parse bug when tag name is not ASCII alpha (#497 by @Zuckjet) bc010de
Diverse:
- Improve Coverage (#540 by @brettz9) 6d8a2ff
- Check missing elem with
getOneElement
(#543 by @brettz9) 1cf297e - Add test for #125 40d9556
Thanks to everyone that contributed to this release!
Commit Range:
v4.1.0...v5.0.0
v4.1.0
v4.0.0
3.3.0: [tests] write only single characters for testing chunked data
failed previously (only for FeedHandler tests), fixed now due to DomHandler upgrade (which removed the `ignoreWhitespace` option)