Unwrap closed nodes one by one when creating a replace step
Unwrap closed nodes one by one when creating a replace step

FIX: Fix an issue where a replace could needlessly drop content when
the first node of the slice didn't fit the target context.

See https://discuss.prosemirror.net/t/cut-and-paste-does-not-restore-the-document/2166

ProseMirror/prosemirror-transform