Last modified: 2011-12-14 17:37:22 UTC
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 http://en.wikipedia.org/wiki/ Devils_Tower_National_Monument. More on this is at http://en.wikipedia.org/wiki/Wikipedia_talk: WikiProject_Protected_areas#Disclamer. 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>.
Does the version without comments have blank lines there?
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 http://en.wikipedia.org/wiki/ Nisqually_National_Wildlife_Refuge to http://en.wikipedia.org/wiki/ 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?
I removed the comments and the associated new lines. See http://en.wikipedia.org/w/index.php? 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:// en.wikipedia.org/wiki/Effect_of_Hurricane_Katrina_on_New_Orleans do not seem to introduce blank lines. The comments at the start of "Hurricane Katrina" do appear to add blank lines. http://en.wikipedia.org/ 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.
It's a parser quirk. I moved the __NOEDITSECTION__ tag above the HTML comment at [[Hurricane Katrina]] and that helped.
INVALID, this is how comments work, and are supposed to work.
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.