Skip to content

feat: add clone_subtree method for NodeMut#48

Merged
adamreichold merged 1 commit intorust-scraper:masterfrom
xu-cheng:clone_subtree
Jan 15, 2026
Merged

feat: add clone_subtree method for NodeMut#48
adamreichold merged 1 commit intorust-scraper:masterfrom
xu-cheng:clone_subtree

Conversation

@xu-cheng
Copy link
Contributor

This is needed to support the new clone_subtree method since html5ever 0.37.

See https://docs.rs/html5ever/0.37.1/html5ever/tree_builder/trait.TreeSink.html#tymethod.clone_subtree.

@adamreichold
Copy link
Member

This is needed to support the new clone_subtree method since html5ever 0.37.

Is this the only blocker to upgrading our html5ever dependency? If so, could you add that to this pull request?

@xu-cheng
Copy link
Contributor Author

Is this the only blocker to upgrading our html5ever dependency? If so, could you add that to this pull request?

It will be a different PR to scraper crate after a new version of ego_tree is released.

@adamreichold
Copy link
Member

It will be a different PR to scraper crate after a new version of ego_tree is released.

Yes, of course. Sorry, I was confused as I thought we are in the scraper repository.

Copy link
Member

@adamreichold adamreichold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two tiny formatting nits, otherwise, I think the implementation turned out great if somewhat more complex than the initial approach.

Thank you for putting in the extra work!

@adamreichold adamreichold merged commit b6617bc into rust-scraper:master Jan 15, 2026
5 checks passed
@xu-cheng xu-cheng deleted the clone_subtree branch January 15, 2026 20:12
@adamreichold
Copy link
Member

@cfvescovo Could you publish a new patch version to crates.io so that scraper can be moved to html5ever 0.37? Thank you! (I would do so myself, but I do not have access.)

@cfvescovo
Copy link
Member

Hi @adamreichold, I apologize for the delay. I will publish it today and give you access to crates.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants