Page MenuHomePhabricator

VE: Avoid piping links for formatting where possible
Closed, ResolvedPublic

Description

I don't know if this has been reported yet, I couldn't find it when searching for VE reports related to linking.

When using wikilinks and then formatting them, the VE will always pipe them, even if this is not required, e.g.

[[Link|''Link'']] instead of ''[[Link]]''

That seems unnecessary and on en-wiki a bot runs to fix those errors, which seems counterproductive. Instead, the VE should be able to determine whether the whole link is formatted and then just apply to formatting outside the [[ ]].

Event Timeline

SoWhy created this task.Apr 7 2018, 2:57 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 7 2018, 2:57 PM
dchan added a subscriber: dchan.

Thanks SoWhy, things like this would happen during the HTML->wikitext conversion in Parsoid, so I've tagged it as an issue for the Parsoid team to look at.

ssastry triaged this task as Normal priority.Apr 8 2018, 2:20 AM
ssastry added a subscriber: ssastry.

Looks like one more thing to do along the lines of https://www.mediawiki.org/wiki/Parsoid/Normalizations.

ssastry assigned this task to Sbailey.Apr 9 2018, 1:59 AM
ssastry moved this task from Backlog to html2wt on the Parsoid board.

Change 425884 had a related patch set uploaded (by Sbailey; owner: Sbailey):
[mediawiki/services/parsoid@master] For VE, Avoid piping lings for formatting

https://gerrit.wikimedia.org/r/425884

The normalization code now checks for matching href and textContent, and also avoid normalizing WikiLinks that have color, style and class attributes.

Restricted Application added a project: Product-Analytics. · View Herald TranscriptApr 19 2018, 12:02 AM

Change 425884 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Avoid piping links for formatting when possible

https://gerrit.wikimedia.org/r/425884

Arlolra closed this task as Resolved.Apr 30 2018, 8:34 PM