- Added support for nested
:not()with simple selectors. - Updated
selectors
- Replaced several panicking assertions with gracefully reported errors, especially in the C API
- Performance improvements.
- Updated dependencies.
- Improve type generation in js-api.
- Updated dependencies.
- Added source code locations to the C and JS APIs
- Significant performance improvements and code size reductions
- Source code locations for tags and other tokens.
- Document text chunks and escaping of attributes.
- Selector validation improvements.
- Upgraded
selectorsandcssparser.
- Added
element.onEndTagto JS bindings. - Refactored TextDecoder and token construction to avoid heap allocations.
- Added fast paths for UTF-8 rewrites.
- Updated cssparser and selectors dependencies
- Adopted
cargo-cfor building the C API - Added WASM/JS API
- An invalid
/>syntax will be removed when content is added to an HTML element
- Added streaming handlers.
- Only allow changing the charset once with the
<meta>tag, in accordance with the HTML spec. - Fixed parsing of invalid elements in
<svg>and<math>.
- Added the ability for the rewriter to be
Send. Thesendmodule contains the utilities for that.
- Remove unmaintained
safememdependency.
- Expose
is_self_closingandcan_have_contentin C api. - Make
ElementContentHandlersandDocumentContentHandlersfields public. - Add missing docs to public API.
- Ensure that
TagScanner::is_in_end_tagresets when changing parsers.
- Added ability to get the tag and attribute names with the original casing.
- The C API's new
lol_html_element_add_end_tag_handler()function now sets the last error retrievable bylol_html_take_last_error()if it is called on an element that can have no end tag.
Yes, you got that right: this is the first 1.x release! From now on you should expect this project to adhere to the semantic versioning spec (we have been somewhat relaxed about that in the past).
- Added
Element::end_tag_handlers()which allows better control over the end tag handlers.
- Removed
Element::on_end_tag()andElement::add_on_end_tag()in favor of the newly addedElement::end_tag_handlers().
- Added method
TextChunk::as_mut_str()andTextChunk::set_str()for in-place modifications to the text in aTextChunk. (#175)
- Modified method
Element::on_end_tag()to support multiple handlers. This is a breaking change since the old semantics of the method was to overwrite any previously set handler. (#177)
- Support dynamic charset change on meta tags in HtmlRewriter. (#162)
- Add
Element::can_have_content(). (#163)
- Add
Doctype::remove. (#129) - Add
Element::start_tag()andElement::is_self_closing(). (#148) - Add mutation methods to
StartTagandEndTag. (#148) - Implement
Eqfor all types that implementPartialEq. (#146)
- Changed the HTML parser to more closely match the spec. This only affects rewriters which modify HTML comments. (#128)
- Add
Element::on_end_tag(#97, #107, #124)
- Change string allocators in the C API to return
lol_html_str_t, notlol_html_str_t*. This was necessary to fix a memory leak inlol_html_str_free. (#115) - Update dependencies (#98, #103)
- Fix memory leaks in C API (#113, #115)
- Add unofficial Go bindings to the README (#77)
- Update dependencies (#73)
- Take
selfin HtmlRewriter::end (#68) - Refactor HTMLRewriter Settings to make
HTMLRewriter::newinfallible (#70) - Allow using
element!in a separate expression fromrewrite_str(#69) - Update to hashbrown 0.9 (#64)
- Add Send+Sync constraint for ContentHandler Error
- feat: Allow using either Settings or RewriteStrSettings (#57)
- Fix unhappy clippy (#60)
- Compile literal attribute name lowercase instead of value (#51)
- Use more memory efficient nth-of-type tracking. (#49)
- Minor cleanup from :nth-child (#48)
- Add support for :nth-child selectors (#47)
- Added:
DocumentContentHandlers::end.
- Initial release