0.8.0
Release Notes v0.8.0 (November 3, 2024)
This release brings significant internal refactoring, new filtering capabilities, and improvements to node manipulation methods.
🔄 Major Changes
- Simplified internal architecture by replacing generic types with concrete
NodeDatatype - Moved implementations from
NodetoNodeRef(Nodeis now an alias forNodeRef) - Simplified the internal logic of several methods (
replace_with_html,set_html,append_html) usingTree::merge
✨ New Features
- Added new Selection filtering methods:
Selection::filterSelection::filter_matcherSelection::try_filterSelection::filter_selection
- Introduced new NodeRef manipulation methods:
NodeRef::replace_with- replace a node with another oneNodeRef::replace_with_html- replace a node with HTML contentNodeRef::set_text- set node's text contentNodeRef::append_prev_siblings- prepend nodes before selected node
- Added new
:only-textpseudo-class for selecting nodes with single text child - Implemented
NodeIdProvertrait forNodeRefandNodeto simplify API usage
🛠️ Minor Changes
- Simplified
Node::has_textfunctionality
🐛 Bug Fixes
- Corrected
<NodeRef<'a> as selectors::Element>::is_emptyto handle line breaks and whitespace properly.
🗑️ Removals
The following deprecated methods have been removed:
Tree::append_children_from_another_treeTree::append_prev_siblings_from_another_treeNode::append_children_from_another_treeNode::append_prev_siblings_from_another_tree
Full Changelog: 0.7.0...0.8.0