The final case in ve.dm.Document.getMetadataReplace() applies if insert.length > remove.length. But in this case only the 'retain' and 'insert' fields are set on the returned object. In ve.dm.Transaction.pushReplace() we only add the {retain,remove,insert}Metadata fields to the operation if the 'remove' field on the object returned from getMetadataReplace() is not undefined. So these fields won't be set correctly if insert.length > remove.length.
Version: unspecified
Severity: normal