Page MenuHomePhabricator

Misnested annotations do not round-trip correctly - autoInsertedEnd used despite editMode?
Closed, DuplicatePublic

Description

$ echo "'''<sub>Foo'''Bar</sub>" | node parse.js | node parse.js --html2wt
'''<sub>Foo'''Bar

$ echo "'''[[DTW|D'''etroit]]" | node parse.js | node parse.js --html2wt
WARNING: DSR inconsistency: cs/s mismatch for node: A s: 9; cs: 20
'''[[DTW|D]]'''[[DTW|etroit]]

Version: unspecified
Severity: normal

Details

Reference
bz55410

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:12 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz55410.
Catrope created this task.Oct 7 2013, 2:34 PM

https://gerrit.wikimedia.org/r/#/c/83216/ will fix the second example:

[subbu@earth lib] echo "'''[[DTW|D'''etroit]]" | node parse.js | node parse.js --html2wt
'''[[DTW|D'''etroit''']]'''

Verified that the second case is fixed now that 83216 is merged.

In the first case I'd expect the output to be "'''<sub>Foo</sub>'''Bar". For some reason the autoInsertedEnd marker seems to be used here despite editMode being true, which looks like a bug.

Tidy seems to handle sub mis-nestings different from the HTML spec:
https://www.mediawiki.org/wiki/User:GWicke/Test/Sub

I'm inclined to follow the HTML5 spec in this case.

Arlolra removed GWicke as the assignee of this task.Nov 25 2014, 8:04 PM
Arlolra set Security to None.
ssastry moved this task from Needs Discussion to In Progress on the Parsoid board.Feb 2 2015, 3:22 PM
ssastry updated the task description. (Show Details)Feb 13 2015, 9:08 PM
ssastry claimed this task.Oct 16 2015, 3:36 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 16 2015, 3:36 PM
ssastry moved this task from In Progress to Next Up on the Parsoid board.Dec 17 2015, 5:37 PM
ssastry moved this task from Next Up to Needs Triage on the Parsoid board.Sep 11 2017, 7:10 PM
LGoto moved this task from Needs Triage to Backlog on the Parsoid board.Feb 15 2020, 9:42 PM
ssastry removed ssastry as the assignee of this task.Mar 18 2020, 5:46 PM