0.10.0
Release Notes v0.10.0 (November 25, 2024) π
π Check out examples
β¨ New Features
- Introduced new node manipulation methods:
NodeRef::insert_after
: Insert a node after the selected nodeNodeRef::descendants_it
: Iterate over all descendants of a nodeNodeRef::descendants
: Get a vector containing all descendants of a node
- Added normalization functionality:
NodeRef::normalize
: Merges adjacent text nodes and removes empty text nodes at node levelDocument::normalize
: Performs normalization across the entire document
β οΈ Deprecations
Several methods have been deprecated in favor of more consistently named alternatives:
NodeRef::append_prev_sibling
βNodeRef::insert_before
NodeRef::append_prev_siblings
βNodeRef::insert_siblings_before
Tree::append_prev_sibling_of
βTree::insert_before_of
π¨ Improvements
- Modified
Document::from
andDocument::fragment
to disable scripting in HTML parser, enabling proper querying ofnoscript
elements
π Fixed
Document::text
method now returns the text content, whereas previously it returned an empty string
π§ Minor Changes
- Added support for ordered comparison of node IDs through implementation of
Ord
trait forNodeId
π Migration Guide
Users are encouraged to update their code to use the new method names for better maintainability. The deprecated methods will be removed in a future release.
Full Changelog: 0.9.1...0.10.0