File tree Expand file tree Collapse file tree 3 files changed +1
-3
lines changed Expand file tree Collapse file tree 3 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ All notable changes to the `dom_query` crate will be documented in this file.
6
6
7
7
### Fixed
8
8
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.
10
10
11
11
## [ 0.19.0] - 2025-05-20
12
12
Original file line number Diff line number Diff line change @@ -747,7 +747,6 @@ impl NodeRef<'_> {
747
747
748
748
/// Creates a full copy of the node's contents as a [Document] fragment.
749
749
pub fn to_fragment ( & self ) -> Document {
750
-
751
750
if self . id . value == 0 || self . has_name ( "html" ) {
752
751
return Document {
753
752
tree : self . tree . clone ( ) ,
Original file line number Diff line number Diff line change @@ -585,6 +585,5 @@ fn test_copy_fragment() {
585
585
let frag = src_frag. html_root ( ) . to_fragment ( ) ;
586
586
assert_eq ! ( frag. select( "html" ) . length( ) , 1 ) ;
587
587
588
-
589
588
assert ! ( dst_frag. tree. validate( ) . is_ok( ) ) ;
590
589
}
You can’t perform that action at this time.
0 commit comments