Page MenuHomePhabricator

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


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 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.