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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6161, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4161 - Blank lines at the top of an article should be ignored
Blank lines at the top of an article should be ignored
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.6.x
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Nisquall...
: newparser
: 26645 (view as bug list)
Depends on:
Blocks:
  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: ---


Attachments

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 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>.
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 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.
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 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.


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.


Navigation
Links