Page MenuHomePhabricator

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


We currently include newlines in transclusion parameters, which lets users delete them. That can create diffs like this:

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



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

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

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 removed GWicke as the assignee of this task.Nov 25 2014, 6:29 PM
marcoil set Security to None.
marcoil added a project: Parsoid.
Elitre added a subscriber: Elitre.Oct 19 2015, 11:32 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 19 2015, 11:32 AM
Pols12 added a subscriber: Pols12.May 26 2019, 3:34 PM

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