mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
5095e27925
In ve.dm.Document.getMetadataReplace(), we used to only merge metadata if the amount removed is larger than the amount inserted. But this could end up putting metadata in odd positions, for example if you have Foo[[Category:Bar]]Baz and you delete 'ooBa' and replace it with {image}xxx{/image}, then the category ends up inside the image. We should always merge metadata when a segment is deleted, so that it appears outside any new structure added. There's a weird corner case here when a segment is removed but no insertion is made: the removed metadata then needs to get glommed onto the next element. We extend the insert/replace metadata array when this happens. Bug: 53444 Bug: 53445 Change-Id: I51d55fb370b473273f9cf152fdd0f356377d4109 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init | ||
ui | ||
example.png | ||
index.php | ||
ve.BranchNode.test.js | ||
ve.Document.test.js | ||
ve.Element.test.js | ||
ve.Factory.test.js | ||
ve.LeafNode.test.js | ||
ve.Node.test.js | ||
ve.qunit.js | ||
ve.Range.test.js | ||
ve.test.js | ||
ve.test.utils.js |