Page MenuHomePhabricator

Parsoid: Round trip bug with apostrophe next to italics
Closed, ResolvedPublic

Description

<i>Rolling Stone</i>'s

serialises to:

'''Rolling Stone'''s

which then converts back to

<i>Rolling Stone'</i>s

In both Parsoid & PHP parser, with the apostrophe now italicised.


Version: unspecified
Severity: normal

Details

Reference
bz50179

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:03 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz50179.
Esanders created this task.Jun 25 2013, 2:47 PM

Related URL: https://gerrit.wikimedia.org/r/70554 (Gerrit Change I1e47c651324f40d7ff562f0eeb6f19bd6989ffd2)

https://gerrit.wikimedia.org/r/70554 (Gerrit Change I1e47c651324f40d7ff562f0eeb6f19bd6989ffd2) | change APPROVED and MERGED [by jenkins-bot]

We still have a minor round trip issue where

''Rolling Stone'''s

round trips to

''<nowiki>Rolling Stone'</nowiki>''s

Although the latter is arguably much better, it is still a dirty diff.

When the <i> and its subtree is unmodified, selective serialization avoids dirty diffs. So in any case the diff will be very localized.

Because of the complex heuristics used in quote handling it will be difficult to avoid nowikis altogether for modified or new content. We can try to serialize this as ''Rolling Stone'<nowiki/>''s though.

Actually, ''Rolling Stone''<nowiki/>'s is the desired serialization.

This has already been fixed at some point in the last 6 weeks.

[subbu@earth tests] echo "<i>Rolling Stone</i>'s" | node parse --html2wt
''Rolling Stone''<nowiki/>'s