Last modified: 2013-09-04 02:22:58 UTC
In ve.dm.Document.getMetadataReplace(), we 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]]BazQuux 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.
Change 81928 had a related patch set uploaded by Cscott: Collapse metadata on any removal. https://gerrit.wikimedia.org/r/81928
Change 81928 merged by jenkins-bot: Collapse metadata on any removal. https://gerrit.wikimedia.org/r/81928