Last modified: 2011-12-14 17:37:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4161 - Blank lines at the top of an article should be ignored
Blank lines at the top of an article should be ignored
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: newparser
: 26645 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2005-12-04 03:12 UTC by Walter Siegmund
Modified: 2011-12-14 17:37 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Walter Siegmund 2005-12-04 03:12:31 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
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>.
Comment 1 Brion Vibber 2005-12-04 08:33:01 UTC
Does the version without comments have blank lines there?
Comment 2 Walter Siegmund 2005-12-04 17:17:45 UTC
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.
Comment 3 Brion Vibber 2005-12-05 00:41:41 UTC
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?
Comment 4 Walter Siegmund 2005-12-05 01:47:52 UTC
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.

Comment 5 Zoran Obradovic 2005-12-05 02:10:06 UTC
It's a parser quirk. I moved the __NOEDITSECTION__ tag above the HTML comment at
[[Hurricane Katrina]] and that helped.
Comment 6 Ævar Arnfjörð Bjarmason 2005-12-15 20:32:32 UTC
INVALID, this is how comments work, and are supposed to work.
Comment 7 David Benbennick 2005-12-25 21:48:25 UTC
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.
Comment 8 Thomas Bertels 2011-01-22 17:13:25 UTC
*** Bug 26645 has been marked as a duplicate of this bug. ***
Comment 9 Mark A. Hershberger 2011-04-12 16:03:56 UTC
Punting to the new parser Brion has in the works.

Note You need to log in before you can comment on or make changes to this bug.