Page MenuHomePhabricator

Substituting a template with an initial number sign (#) always leaves a blank line at the top
Closed, DuplicatePublic

Description

Even though the wikitext of the page Template:Draftshell on the English Wikipedia does not include a blank line; or even a line only saying <noinclude>, <includeonly>, or <onlyinclude>; at the top, whenever it is substituted, the resulting wikitext will always include a blank line at the top, above the redirect.

If possible, we should fix the substitution code to no longer add a stray blank line.

More generally, this issue will occur whenever a substituted template's wikitext begins with an initial number sign (#), perhaps preceded by <includeonly> or <onlyinclude>. I reproduced this by creating two pages named after this Phabricator task on The Test Wiki.

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptApr 15 2020, 4:51 PM
GeoffreyT2000 renamed this task from Substituting a template used for creating redirects always leaves a blank line at the top to Substituting a template with an initial number sign (#) always leaves a blank line at the top.Apr 15 2020, 5:15 PM
Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptApr 15 2020, 8:00 PM