Page MenuHomePhabricator

Parsoid should have template parameter key/value whitespace of " = " not "="
Closed, ResolvedPublic

Description

In edits like https://fr.wikipedia.org/w/index.php?diff=94100781 , the whitespaces between the equal sign of a template parameter and the value of that parameter are removed. This causes confusing diffs since the user didn't make that change.


Version: unspecified
Severity: normal

Details

Reference
bz49901

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:43 AM
bzimport set Reference to bz49901.

If the user edited the transclusion, then normalization of spaces is to be expected, as remembering every purely syntactical variation would add way too much complexity and slow down processing.

If the user did not touch the transclusion, then you should not see any diff in the template. If you are still seeing a diff, then it is pretty likely that this is a VisualEditor issue. There were some issues in the preservation of HTML for templates when passed through VisualEditor, which can cause the template to appear edited when we get the HTML back.

That said, we are considering changing the default for edited templates where we normalize to a single space around the '=' sign. This will still affect other templates where there was no space around them before, but in general, the change might be a better default.

This will still not fix the problem when HTML isn't preserved (either due to Parsoid or VE bugs) in its original form (as noted by Gabriel). But, changing the default whitespace around '=' for template transclusions should make this look a little better.