Skip to content

0.10.0

Compare
Choose a tag to compare
@niklak niklak released this 25 Nov 10:08
· 98 commits to main since this release

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 node
    • NodeRef::descendants_it: Iterate over all descendants of a node
    • NodeRef::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 level
    • Document::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 and Document::fragment to disable scripting in HTML parser, enabling proper querying of noscript 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 for NodeId

πŸ”„ 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.

Changelog

Full Changelog: 0.9.1...0.10.0