isAdjacentNode(node1, node2) {
      let current = node1.nextSibling;
      while (current) {
        if (current === node2) return true;
        if (current.nodeType === 1 && !this.isWhitespaceNode(current)) return false;
        current = current.nextSibling;
      }
      return false;
    }
Checks if two DOM nodes are adjacent siblings, ignoring whitespace nodes.

This method iterates over the sibling nodes of `node1` until it encounters
either `node2` (indicating adjacency) or another element node that is not
a whitespace text node (indicating they are not adjacent).

@param {Node} node1 - The first DOM node.
@param {Node} node2 - The second DOM node to check adjacency with.
@returns {boolean} `true` if `node2` is an adjacent sibling of `node1`, ignoring whitespace; otherwise `false`.
@private