The function doc for AddSibling
suntong opened this issue · comments
suntong commented
The function doc for AddSibling
says:
AddSibling adds a new node 'n' as a sibling of a given node 'sibling'. Note it is not necessarily true that the new node 'n' would be added immediately after 'sibling'. If 'sibling' isn't the last child of its parent, then the new node 'n' will be added at the end of the sibling chain of their parent.
IIUC, that can be simplified as,
AddSibling adds a new node 'n' as a sibling of a given node 'sibling'. The new node 'n' will always be added at the end of the sibling chain of their parent.
Is my understanding correct? thx