Page MenuHomePhabricator

Extended annotation ranges sometimes duplicate the closing tag when round-tripping with edits
Closed, ResolvedPublicBUG REPORT


When an annotation range gets extended around a list, adding a bullet point at the end of that list creates a second </translate> tag, which then breaks the VisualEditor workflow (since the tags are not well balanced anymore).

This is reproduced by the following test case:

!! test
Extended annotation marker should not get duplicated
!! options
        "modes": ["selser"],
        "changes": [
                ["li", "after", "<li>Second item</li>"]
!! wikitext
* First item</translate>
!! wikitext/edited
* First item
* Second item
!! end

which renders instead

* First item</translate>
* Second item

Related Objects

Event Timeline

Arlolra triaged this task as Medium priority.Jan 6 2022, 12:04 AM
Arlolra moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.

Change 760914 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/services/parsoid@master] Fix annotation range detection interactions with selser

Test wiki created on Patch demo by IHurbainPalatin (WMF) using patch(es) linked to this task:

Test wiki on Patch demo by IHurbainPalatin (WMF) using patch(es) linked to this task was deleted:

Change 760914 abandoned by Isabelle Hurbain-Palatin:

[mediawiki/services/parsoid@master] Fix duplication of extended annotation range tags


We're going with the solution of making these ranges uneditable instead (769071)