Skip to content

Commit 098bc98

Browse files
committed
CHANGELOG.md: update
1 parent a9abadb commit 098bc98

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All notable changes to the `dom_query` crate will be documented in this file.
66

77
### Fixed
88

9-
- Fixed the behavior of `NodeRef::to_fragment` when the node is an html element or the root itself.
9+
- Fixed the behavior of `NodeRef::to_fragment` when the node is an `<html>` element or the root itself.
1010

1111
## [0.19.0] - 2025-05-20
1212

src/node/node_ref.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,6 @@ impl NodeRef<'_> {
747747

748748
/// Creates a full copy of the node's contents as a [Document] fragment.
749749
pub fn to_fragment(&self) -> Document {
750-
751750
if self.id.value == 0 || self.has_name("html") {
752751
return Document {
753752
tree: self.tree.clone(),

tests/node-traversal.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,5 @@ fn test_copy_fragment() {
585585
let frag = src_frag.html_root().to_fragment();
586586
assert_eq!(frag.select("html").length(), 1);
587587

588-
589588
assert!(dst_frag.tree.validate().is_ok());
590589
}

0 commit comments

Comments
 (0)