is_ancestor: Check if one node is an ancestor of another
Description
Helper function to check if a node is an ancestor of another node
in the code hierarchy, preventing circular references when moving items.
Usage
is_ancestor(potential_ancestor, node)
Value
Logical indicating whether potential_ancestor is an ancestor of node
Arguments
- potential_ancestor
Node object to check as potential ancestor
- node
Node object to check ancestry against