Page MenuHomePhabricator

TemplateData GUI adds linebreaks before <noinclude>
Closed, ResolvedPublic1 Estimated Story Points

Description

After having added TemplateData to a template by clicking "Manage TemplateData" -> Apply the <noinclude> tag surrounding the TemplateData is inserted into the template preceded by two linebreaks.

Some templates might be sensitive to the included whitespace and for these it would be better if the <noinclude> followed directly after the template code.

Event Timeline

Lokal_Profil raised the priority of this task from to Needs Triage.
Lokal_Profil updated the task description. (Show Details)
Lokal_Profil added a project: TemplateData.
Lokal_Profil added a subscriber: Lokal_Profil.
Jdforrester-WMF set Security to None.
Amire80 added a subscriber: Amire80.

Indeed, happens to me all the time.

TemplateData itself goes into a <noinclude> element in the end of the template's source code, and many templates already have a <noinclude> element there, so it could be reused.

Krenair added a subscriber: Krenair.

I'll try to avoid having an extra blank line in this task, see T96537 for reusing an existing noinclude

Change 263635 had a related patch set uploaded (by Alex Monk):
Avoid adding an extra blank line before <noinclude>

https://gerrit.wikimedia.org/r/263635

Jdforrester-WMF edited projects, added VisualEditor; removed Patch-For-Review.
Jdforrester-WMF edited a custom field.

Change 263635 merged by jenkins-bot:
Avoid adding an extra blank line before <noinclude>

https://gerrit.wikimedia.org/r/263635