mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
5830bce72c
The `Transaction.pushReplace` method has a corner case if the removed region has metadata and the inserted region is empty. This works fine unless there are two adjacent `pushReplace` operations, which can occur in `Transaction.newFromUnwrap`. Fix this by having `pushReplace` look at a preceding replace and correctly merge the two operations if possible (in particular in the tricky case where the previous case has a zero-length insertion). Pleasantly, this can be done without a lot of special-casing code in `pushReplace` or `newFromUnwrap`. Add test cases verifying the `newFromUnwrap` works correctly (both in commit and in rollback) when there is metadata present. Change-Id: I6cfec0d2b1823dad724422f018a3c73dc0c7f186 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init | ||
test | ||
ui | ||
ve.BranchNode.js | ||
ve.debug.js | ||
ve.Document.js | ||
ve.Element.js | ||
ve.EventEmitter.js | ||
ve.EventSequencer.js | ||
ve.Factory.js | ||
ve.js | ||
ve.LeafNode.js | ||
ve.NamedClassFactory.js | ||
ve.Node.js | ||
ve.Range.js | ||
ve.Registry.js | ||
ve.track.js |