Page MenuHomePhabricator

Parsoid: Spaces after = sign in transclusion parameters are eaten
Closed, ResolvedPublic

Description

  1. Go to [[eigenvalues and eigenvectors]] on enwiki
  2. Click "Edit" with VE enabled
  3. Make some trivial change (e.g. spelling) and click "save" > "review your changes"
  4. Go make a coffee... it's soooooooooo sloooooooooow... but when it finally shows you the diff, you see that trailing spaces are lost after = signs in template parameter names.

This is affecting the current deployment on enwiki and causing people to make unexpected changes.


Version: unspecified
Severity: normal

Details

Reference
bz49615

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:52 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz49615.

This is being done in Parsoid; canonical wikitext is to have a space either side of the '=' in transclusion settings, but ideally Parsoid shouldn't eat or add them if the parameter's not being changed IMO. Gabriel?

This is actually a side effect from a different bug: Bug 49655. Infoboxes seem to be affected primarily from what I can tell. This is a regression from the above bug, not a new bug.

The space issue should a different discussion -- but summarizing earlier discussion here for quick reference.

There are no spaces around '=' that are coded on a single line (ex: cite) vs. those that are coded across multiple lines (ex: infoboxes). So, no matter what default we pick, we will introduce dirty diffs for templates that are edited via VE. We could use some smart hacks/conditions for when to use spaces and not, but that is something for later once template transclusion editing via VE becomes more common. That ought to be a different bug/feature discussion -- but does not seem high priority for the current deployment.

My suggestion is to track 49655 and see if fixing that bug fixes this problem.

(In reply to comment #2)

There are no spaces around '=' that are coded on a single line (ex: cite) vs.
those that are coded across multiple lines (ex: infoboxes).

Actually, that's not true; canonical use of those templates differ amongst enwiki users, let alone between wikis, even when on a single line. So, yes, agreed that we can't just force it either way without dirty-diffing.

My suggestion is to track 49655 and see if fixing that bug fixes this
problem.

Marked this as depending on that. To review the "default" issue if this is still a problem when that's fixed?

Selective serialization was not used for the templates due to other bugs, which normalized the serialization. This is now verified fixed with current master and will be verified in production later today before closing #49655, so closing this now as fixed.

[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]