Skip to content

Conversation

@kbrock
Copy link
Collaborator

@kbrock kbrock commented Mar 29, 2023

Fixes #539

@brendon is this what you had in mind?
How do you usually get into this method?

read: I'm wondering where we want to pass add_orphans: false

Copy link
Contributor

@brendon brendon left a comment

Choose a reason for hiding this comment

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

Looks good. Would definitely need a test or two to ensure it's working as it's such a mind-job every time reading that code :D

# @returns Hash{Node => {Node => {}, Node => {}}}
# If a node's parent is not included, the node will be included as if it is a top level node
def arrange_nodes(nodes)
def arrange_nodes(nodes, add_orphans: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

It might make more sense to call is rootify_orphans or perhaps in the reverse discard_orphans?

@kbrock
Copy link
Collaborator Author

kbrock commented Jul 17, 2023

WIP: functionality complete. need tests

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.

arrange that discards orphans

2 participants