Page MenuHomePhabricator

TemplateData: Hint that templates should have whitespace inserted after/before them (e.g. for message box notice templates)
Closed, ResolvedPublic0 Estimated Story Points


Adding template 'unref' to the top of an article should add a new line, rather than putting {{unref}} at beginning of the existing line.

Steps to reproduce:

  2. Position cursor at beginning of the text
  3. Click Transclusion (Insert template)
  4. Select template 'Unreferenced'
  5. Click 'add template' and 'apply changes'

Expected results:
The template should be placed as a block above the first line.

Actual results:
The text is placed to the right of the template, on the same line.

(The same problem can be seen by creating a sandbox in VE with 'Blah', and then adding {{unref}} per the steps above.)

The {{unref}} template contains a line feed. Wikitext '{{unref}}Blah' is not rendered with Blah on the same line as the template.

The VE is

  1. displaying the wikitext incorrectly, and
  2. not intelligently knowing that inserting '{{unref}}' requires the insertion of a line feed after the template.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:55 AM
bzimport added a project: TemplateData.
bzimport set Reference to bz51334.
jayvdb created this task.Jul 15 2013, 12:33 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 15 2016, 9:16 PM
Jdforrester-WMF closed this task as Resolved.Jan 15 2016, 9:24 PM
Jdforrester-WMF claimed this task.

T64147: Add an option in TemplateData to specify desired wikitext whitespace formatting of parameters was implemented that should resolve this requirement; 'block' mode requires Foo{{bar|boom=bang}}baz to be Foo{{bar\n| boom = bang\n}}\nbaz (see specification). Implementation of this in Parsoid is T111674: Parsoid on serialisation should use the `format` field from TemplateData if available to set the whitespace formatting of new/edited transclusions.

Jdforrester-WMF moved this task from Backlog to Doing on the TemplateData board.Jan 15 2016, 9:25 PM
Jdforrester-WMF set the point value for this task to 0.Apr 28 2016, 1:31 AM
Jdforrester-WMF set Security to None.