nodePathAt static method
Gets the node path containing the specified offset (from root to leaf)
root Document root node
offset Source character offset
Returns the path from the root to the deepest matching leaf node.
Returns an empty list if the offset is not within any node's range.
Implementation
static List<LatexNode> nodePathAt(LatexNode root, int offset) {
final path = <LatexNode>[];
_findPath(root, offset, path);
return path;
}