Page MenuHomePhabricator

Blank lines at the top of an article should be ignored
Open, LowPublicFeature


Author: siegmund

Comments bracketing protected areas infobox template introduce unwanted blank lines at top of page when page
is rendered. Compare blank area above article for Nisqually with the same for
Devils_Tower_National_Monument. More on this is at

I compared the HTML source of the rendered page with and without the comments. The version with comments
contains <p><br /></p> immediately before the tag <table class="infobox" style="width: 300px; font-size:
90%;">. The version without the comments does not contain <p><br /></p>.

Version: 1.6.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 8:57 PM
bzimport set Reference to bz4161.
bzimport added a subscriber: Unknown Object (MLST).

Does the version without comments have blank lines there?

siegmund wrote:

Only the version with the comments has the superfluous blank lines at the top of the page (and <p><br /

</p>). Unless they have been edited, you can compare

Nisqually_National_Wildlife_Refuge to
Devils_Tower_National_Monument. For my comparison, I saved the source from [[Nisqually National
Wildlife Refuge]], then removed the comments and saved the source again.

When you remove the comments, do you leave the newlines? Or do you remove the *entire* line?

A comment alone on a line will be treated equivalently to a blank line. Is that your intention?

siegmund wrote:

I removed the comments and the associated new lines. See
title=Nisqually_National_Wildlife_Refuge&diff=30071997&oldid=30071339 The behavior is consistent
with your statement, "A comment alone on a line will be treated equivalently to a blank line." It was not
the intention of the protected areas wikiproject to introduce blank lines at the beginning of an article by
means of comments bracketing the infobox.

The comments at the start of the article "Effect of Hurricane Katrina on New Orleans", http:// do not seem to introduce blank lines.

The comments at the start of "Hurricane Katrina" do appear to add blank lines.
wiki/Hurricane_katrina It seems likely to me that the editors of "Hurricane Katrina" did not intend to add
blank lines at the beginning of that article, either.

zocky wrote:

It's a parser quirk. I moved the NOEDITSECTION tag above the HTML comment at
[[Hurricane Katrina]] and that helped.

avarab wrote:

INVALID, this is how comments work, and are supposed to work.

dbenbenn wrote:

Alright, how about the following enhancement request: blank lines, including
comments, at the top of articles should be ignored. I can't think of any case
where you'd want an empty paragraph at the top of an article; it would make life
a lot easier for editors if the parser just didn't generate that annoying <p><br
/></p> at the top.

Actually, come to think of it, I've never seen an empty paragraph in the body of
an article where it was actually wanted, either. [[TeX]] is smart enough to
treat consecutive blank lines as one; it would be nice if MediaWiki were that
smart too.

*** Bug 26645 has been marked as a duplicate of this bug. ***

Punting to the new parser Brion has in the works.

All-and-every-Wikisource and ProofreadPage might want blank lines to be preserved, as it merges two pages together and needs to indicate whether the merged pages are two different paragraphs or the same paragraph.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:02 AM
Aklapper removed a subscriber: wikibugs-l-list.