Page MenuHomePhabricator

Transclusion next to noinclude creates unexpected paragraph spacing
Open, Needs TriagePublic

Description

Summary: when a page calls a template, that template can add an erroneous space (<p><br></p>). The bug originates in the content of the transcluded page, which is best summarized as a template next to a noinclude tag. In test2.wikipedia.org, an extra bug appears stating "<swsquaread />" (see https://test2.wikipedia.org/wiki/User:Notmyhandle/Article/Table_of_Contents ).

Live example on test2.wikipedia.org with explanation: https://test2.wikipedia.org/wiki/User:Notmyhandle/Article
List of pages involved in reproducing this bug: https://test2.wikipedia.org/wiki/User:Notmyhandle

I found a fix, based on the location of the template relative to the noinclude tags. Example code arrangements for the Assignee to test are below. The first one fixes the problem (examples are separated by a blank line). All four situations should result in the same output, but they do not.

{{template}}<noinclude></noinclude>
{{template}}
<noinclude></noinclude>
<noinclude></noinclude>{{template}}
<noinclude></noinclude>
{{template}}

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptMar 15 2019, 6:00 AM
Notmyhandle updated the task description. (Show Details)Mar 15 2019, 6:01 AM
Notmyhandle updated the task description. (Show Details)
This comment was removed by Aklapper.
JJMC89 updated the task description. (Show Details)Mar 15 2019, 3:45 PM