Given two different nodes, calculates the range that needs to be replaced with the latter node, to sync them.
constoffset = ... // the shared offset between the two nodes, if needed constdiff = getDiffReplacementRange(existingNode, convertedNewNode) if (diff) { intTr.replace(offset + diff.start, offset + diff.end, convertedNewNode.slice(diff.start, diff.otherEnd)) }
Given two different nodes, calculates the range that needs to be replaced with the latter node, to sync them.