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.

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 set Security to None.