Page MenuHomePhabricator

Parsoid adds <nowiki>...</nowiki> when a single apostrophe follows a link in a bold or italic sentence
Closed, ResolvedPublic

Description

When a single apostrophe follows a link in the middle of a section of bold or italic text, Parsoid unnecessarily nowikis everything between the end of the link and the end of the bold or italic text. i.e.
''Italic [[link]]'s text'' → ''Italic [[link]]<nowiki>'s text</nowiki>''

In my sandbox at least this only seems to happen when the sequence is created in VE though, in the example diff the sentence above the addition, which contains the same markup, but was preexisting, was not touched. https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox3&oldid=570377353&veaction=edit

The change at line 89 of this article-space diff makes me wonder whether it sometimes happens to existing text too https://en.wikipedia.org/w/index.php?title=42_%28number%29&diff=570700339&oldid=570125224

It only occurs when the apostrophe follows a link, i.e. it only occurs when ]]' occurs in a bold or italicised section.


Version: unspecified
Severity: normal

Details

Reference
bz53571

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:05 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz53571.

This seems fixed now,

echo "<i>Italic <a href='./Link'>link</a>'s text</i>" | node tests/parse --html2wt
''Italic [./Link link]'s text''

Also, tested with VE:

https://www.mediawiki.org/w/index.php?title=User:Arlolra/Sandbox/apos&oldid=1068500