previousSibling static method
Gets the previous sibling of a specified node within its parent's child list
Implementation
static LatexNode? previousSibling(LatexNode parent, LatexNode child) {
final children = childrenOf(parent);
final index = children.indexOf(child);
return index > 0 ? children[index - 1] : null;
}