Page MenuHomePhabricator

Link trail isn't applied across template boundaries while skipping over category links
Open, LowPublic

Description

In this edit, VE apparently added a useless nowiki after a template, in an otherwise unmodified sentence :

  • The nowiki is useless
  • VE shouldn't modify by itself sentences that are not modified by the user

Event Timeline

NicoV raised the priority of this task from to Needs Triage.
NicoV updated the task description. (Show Details)
NicoV added a project: VisualEditor.
NicoV subscribed.
nshahquinn-wmf claimed this task.
nshahquinn-wmf subscribed.

@NicoV, thanks for the report. The <nowiki /> is actually necessary. If you take it away, the "en" will be joined to the link right before it, so you will get the equivalent of [[Font Vella]] [[es:Font Vella|(es)en]].

For some reason, it doesn't always show up that way on preview, so I can see where you're coming from. However, if you look at https://fr.wikipedia.org/wiki/Utilisateur:Neil_P._Quinn-WMF/T107012, you'll see what happens.

@Neil_P._Quinn_WMF, you're totally wrong: in the version before VE edit, there was no nowiki between the template and the text, and there was no joining between link and text at all.
Even if it were, it was how the article was, so it's not up to VE to decide to change an article rendering on something not modified by a user.

What's happening here is that the php parser looks past the categories emitted by that template and renders the en as a link trail, but Parsoid doesn't. That's probably a bug in Parsoid.

But I'm not sure why selser feels the need to serialize that node. As @NicoV says, it isn't edited. Another thing to look at.

I should clarify. Because Parsoid isn't rendering the en as a link trail, when it serializes, it adds the nowiki to preserve the roundtrip semantics. That part is correct. It's the initial parse that's broken.

@NicoV, sorry, I apologize for the mistake!

@Arlolra, do you know why the PHP parser renders the "en" as a link trail in my sandbox, but not in this version of the article?

@Neil_P._Quinn_WMF, no problem.

The difference in rendering is probably due to the namespace: Template Lien/catégorisation behaves differently based on the namespace.

ssastry renamed this task from Useless nowiki tag added after a template to Link trail isn't applied across template boundaries while skipping over category links.Sep 22 2015, 5:12 AM
ssastry triaged this task as Medium priority.
ssastry removed a project: Parsoid-Nowiki.
ssastry lowered the priority of this task from Medium to Low.Feb 28 2020, 5:49 PM
ssastry moved this task from Link syntax (links & media) to Bugs & Crashers on the Parsoid board.