Skip to content

v7.0.0

Compare
Choose a tag to compare
@fb55 fb55 released this 20 Aug 21:42
· 916 commits to master since this release

htmlparser2@7.0.0 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:

  • Added an isVoidElement method to the parser (#785) 00ce57a

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 for openImpliesClose in the parser (#911) 39a8109
  • Moved logic of FeedHandler to a function (#912) 3a672ff