Page MenuHomePhabricator

Strip leading / trailing whitespace out of transclusion parameters, and try to match single / multi-line style
Closed, ResolvedPublic

Description

We currently include newlines in transclusion parameters, which lets users delete them. That can create diffs like this: https://en.wikipedia.org/w/index.php?title=2013_Campbell%27s_Hall_of_Fame_Tennis_Championships_%E2%80%93_Singles&curid=39873236&diff=563465891&oldid=563456914

Instead we should strip whitespace from transclusion parameters and manage newlines and the whitespace between equal and value transparently in Parsoid.

This also means that we should try to

  • match single / multi-line style with other transclusion parameters
  • create new transclusions with single or multi-line style either based on
    • a heuristic like the number of parameters or total chars, or
    • based on convention information from TemplateData or the like

Version: unspecified
Severity: normal
See Also: T64147

Details

Reference
bz51003

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:01 AM
bzimport added a project: Parsoid-DOM.
bzimport set Reference to bz51003.

Change 72864 had a related patch set uploaded by GWicke:
Bug 51003: Template parameter handling cleanup

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

Change 72864 merged by jenkins-bot:
Bug 51003: Template parameter handling cleanup

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

This patch cleans up whitespace handling in parameters a bit.

Matching the existing style of a template (or the style convention for a template) is still left to do.

  • Bug 51175 has been marked as a duplicate of this bug. ***
marcoil set Security to None.
marcoil added a project: Parsoid.

Is this issue still reproducible? I think solving T138492 has solved this issue (for templates with correctly defined templateData). Or now duplicates T179259?

ssastry claimed this task.

This 2013 era task is no longer relevant indeed. TemplataData takes care of this.