Last modified: 2013-08-15 21:00:54 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 T43756, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41756 - Multiple comments on a single line are interpreted as a blank line
Multiple comments on a single line are interpreted as a blank line
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.21.x
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: C. Scott Ananian
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-04 00:44 UTC by Eduard Braun
Modified: 2013-08-15 21:00 UTC (History)
4 users (show)

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


Attachments

Description Eduard Braun 2012-11-04 00:44:42 UTC
When writing a single comment on a line this line is correctly ignored.
When writing two comments on a single line this line is not ignored but interpreted as a blank line.

See this page for an example that illustrates the issue:
http://en.wikipedia.org/wiki/User:Patrick87/comments

It's not a big problem and there should be only few cases when one actually writes two separate comments on a single line, however formatting shouldn't change depending on if there are only one or two comments on the line.
Comment 1 C. Scott Ananian 2013-08-07 00:32:00 UTC
Another test case:

*a
 <!-- x -->
*b
 <!-- x --> <!-- y --> <!-- z -->
*c

The PHP parser treats 'a' and 'b' as part of the same list, but item 'c' is treated as a completely different list.

There are other examples of this sort in the parserTests.  It's becoming a source of diffs between PHP and Parsoid.
Comment 2 Gerrit Notification Bot 2013-08-07 00:42:35 UTC
Change 77988 had a related patch set uploaded by Cscott:
Preprocessor: Don't treat a line containing multiple comments as a blank line.

https://gerrit.wikimedia.org/r/77988
Comment 3 Gerrit Notification Bot 2013-08-08 16:54:29 UTC
Change 78248 had a related patch set uploaded by Cscott:
Add '-m' option to dumpGrepper; add patterns for bug 41756.

https://gerrit.wikimedia.org/r/78248
Comment 4 Gerrit Notification Bot 2013-08-08 17:26:29 UTC
Change 78248 merged by jenkins-bot:
Add '-m' option to dumpGrepper; add patterns for bug 41756.

https://gerrit.wikimedia.org/r/78248
Comment 5 C. Scott Ananian 2013-08-08 18:11:12 UTC
subbu notes that parsoid accepts both tabs and spaces surrounding the comments. PHP accepts only spaces.  Is it worth tweaking my patch to allow PHP to accept tabs as well?  I don't think it will make any/much difference to content, but it would be nice to converge the parsers.
Comment 6 C. Scott Ananian 2013-08-08 22:18:50 UTC
I've grepped through the 20130708 enwiki dump looking to see how many pages this change would affect.  I found only 414 pages in the article namespace that are affected -- I put the full list at http://en.wikipedia.org/wiki/User:Cscott/bug41756

There are an additional 1,913 articles in the File: Wikimedia: or Portal: namespace which have lines with more than one space-separated comment.  These appear to be mostly bot-generated and mostly harmless.  I've put this list on the above page as well.
Comment 7 Gerrit Notification Bot 2013-08-09 00:32:57 UTC
Change 77988 merged by jenkins-bot:
Preprocessor: Don't treat a line containing multiple comments as a blank line.

https://gerrit.wikimedia.org/r/77988
Comment 8 C. Scott Ananian 2013-08-15 21:00:54 UTC
Verified fixed in beta and test.

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


Navigation
Links