mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
7c1623d915
Avoid making a copy of the entire data array by using `doc.data` and `doc.data.getLength()` instead of `doc.getData()` and `doc.getData().length`. Get rid of some unnecessary conditionals in `Transaction.newFromWrap`: the `tx.pushReplace()` and `tx.pushRetain()` methods will already gracefully no-op if the replaced/retained region is empty; we don't need to add extra control flow to handle that case. Clarify offset math in `Transaction.newFromWrap`. Fix a minor bug in `Transaction.newFromInsertion`: the final retain didn't account for the length of the removed region, if `doc.fixupInsertion` creates one. (This usually doesn't happen.) Remove an inaccurate TODO in `Transaction.pushReplaceMetadata()` -- it is no longer a straight copy/paste of `Transaction.pushReplace`, so a refactor isn't really called for. Change-Id: I7d86a2449978365d69d4a5ed43116c2e9945475d |
||
---|---|---|
.. | ||
jquery | ||
jquery.uls | ||
oojs | ||
qunit | ||
rangy | ||
unicodejs | ||
ve | ||
ve-mw |