Last modified: 2013-06-27 21:54:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52157, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50157 - Dirty diffs due to removing whitespaces from empty template fields
Dirty diffs due to removing whitespaces from empty template fields
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
https://en.wikipedia.org/w/index.php?...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 07:25 UTC by Raimond Spekking
Modified: 2013-06-27 21:54 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raimond Spekking 2013-06-25 07:25:29 UTC
Dirty diffs due to removing whitespaces from empty template fields, see URL.
Comment 1 Raimond Spekking 2013-06-25 10:32:08 UTC
And now the other way: https://de.wikipedia.org/w/index.php?title=Laurentius_Autenrieth&diff=119897871&oldid=116249704

Whitespaces were added.
Comment 2 ssastry 2013-06-25 14:54:22 UTC
Currently our HTML -> WT serialization only modifies wikitext (if any) in edited sections.  So, when templates are edited (as in this example), some whitespace normalization is inevitable since Parsoid does not carry around exact syntatic details (whitespace, quote chars) for every wikitext element.

Once all the more higher priority bugs are ironed out, we could consider looking at improving the granularity of our selective serializer to look into template transclusion wikitext and identify individual modified parameters and use original source wikitext for unmodified parameters.

So, long story short, at least for now, for modified templates, there will be some whitespace and quote diffs on some template transclusion wikitext.

We had originally picked a default where we didn't add additional spaces around '=' chars.  Now, based on discussion with the VE folks and other requests, we decide to go change the default to adding a single whitespace around '=' chars where necessary.
Comment 3 ssastry 2013-06-27 21:54:14 UTC
We have since made tweaks to regular (non-selective) serialization of template transclusions to minimize diffs in template params which should alleviate some of the dirty diffs (see below), but it will be hard to fully eliminate dirty diffs on edited templates.  Closing this for now.

https://gerrit.wikimedia.org/r/#/c/70653/
https://gerrit.wikimedia.org/r/#/c/70741/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links