Page MenuHomePhabricator

Line break is missing when you insert a template after a list
Closed, DuplicatePublic



  1. Insert line break after list (press ENTER)
  2. In an empty line type "{{" -> template dialog appears.
  3. Type in template name (in my case pl-references template called "Przypisy").
  4. VE adds the template <del>and upon reviewing changes (diff) template is inserted in the new line</del>.

Template should be in the new line and diff should be consistent with actual wiki-code being inserted.

New line before the template is removed. And I'm not aware of any way to avoid this (I have to edit wiki-code and insert new line).

This is what got inserted: diff after save. Notice no line break between "." and "{{Przypisy}}".

Because that template transcludes the == Przypisy == section heading (meaning == References == in English), the wikitext markup for the section heading doesn't work, and == Przypisy == appears in plain text at the end of the previous paragraph.

Event Timeline

I wasn't able to reproduce this problem in my sandbox at the Polish Wikipedia.

As a workaround, have you tried adding two blank lines before the template?

Edited to correct two things:

  1. Diff is actually fine. It's just that the template appears to be in new line when the line is long. When is short it is obvious the new line was not inserted before template.
  2. Problem only occurs when you try to insert the template after list. The problem does not occur when you insert the template in an ordinary paragraph.

Adding an empty line before the template does help. Thanks 😃

Whatamidoing-WMF renamed this task from Unable to insert line before template with VE to Line break is missing when you insert a template after a list.Mar 7 2017, 6:11 PM

Here's another example:

Also, when you try to edit that later in visual mode, it turns the list and the template into a complex transclusion, so adding a simple line break to separate the list from the template becomes exceedingly difficult for approximately all the people in the world who are not the product manager.

This will be resolved by T138492: Add support for actual format strings to TemplateData's "format" parameter and adding the appropriate information into the template's TemplateData, I think.