Clarify that Node.duplicate() duplicates entire subtree recursively#112907
Merged
Repiteo merged 1 commit intoNov 18, 2025
Merged
Conversation
Member
|
This contains unrelated content, please remove this |
22083fb to
0a27721
Compare
Contributor
Author
|
Updated - removed the unrelated content and simplified the change to just add "recursively" to the existing line as suggested. |
Member
You did not. As of writing, there's still entirely unrelated changes in this PR deriving from #112876. |
0a27721 to
314e084
Compare
Mickeon
approved these changes
Nov 18, 2025
Contributor
Author
|
Done, thanks! |
Contributor
|
Thanks! Congratulations on your first merged contribution! 🎉 |
Node.duplicate() duplicates entire subtree recursively
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #95895
The documentation for
Node.duplicate()mentioned that it copies "children" but didn't explicitly state that it duplicates the entire node subtree recursively (all descendants, not just direct children).This caused confusion for users who didn't expect the method to duplicate child nodes and their children as well. Added a note to clarify this behavior.