Ah, yeah. I can see now that the slice has a size of 2 with openStart and openEnd greater than zero while the fragment still has a size of 4. So being open, the node gets joined with an adjacent node of the same type. Or well here the first paragraph closes the old paragraph, whereas the second opens a new one which is merged with the old closing tag.
Okay, that seems discernible enough to detect from a transaction. However, knowing whether a transaction merges paragraphs seems not very trivial either. I guess you just have to check whether the range spans the ending tag and the opening tag of two paragraphs with x deleted content in-between them. Only way I can come up with is using nodesBetween and doing some tricky range checking to see if the deletion includes the nodeEnd (pos + nodeSize) of a block node and somewhere down the line, a node start of a similar node which would collapse into one.
Or maybe you can just take the parent node of them both and compare the children between the start and the end of the deletion to see how many nodes were in fact changed. Maybe that’s smarter considering a slice could also replace the deleted nodes making the whole deletion range checking pointless.