Steps:
# Insert line break (press ENTER)
# In an empty line type "{{" -> template dialog appears.
# Type in template name (in my case pl-references template called "Przypisy").
# VE adds the template and upon reviewing changes (diff) template is inserted in the new line.
Expected:
Template should be in the new line and diff should be consistent with actual wiki-code being inserted.
Actual:
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: [[ https://pl.wikipedia.org/w/index.php?title=Puchar_Prezydenta_Rzeczypospolitej_Polskiej&type=revision&diff=48573024&oldid=48268433 | 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.