Preprocessor: Don't treat a line containing multiple comments as a blank line.
authorC. Scott Ananian <cscott@cscott.net>
Wed, 7 Aug 2013 00:21:00 +0000 (20:21 -0400)
committerTim Starling <tstarling@wikimedia.org>
Fri, 9 Aug 2013 00:28:28 +0000 (00:28 +0000)
commitf089e20bc00f6f6e6cc15b4fd8f81bbe9c3dc102
tree213b1515406ca06258eed46570bb40fb0503f2dc
parentebbea3c974312c56e93799fc93ee3f35130703f9
Preprocessor: Don't treat a line containing multiple comments as a blank line.

After this patch, 'a', 'b', and 'c' are all treated as members of the
same list in the following wikitext:

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

The old comment-removal rule was "trim a comment which is both
preceded and followed by a newline (ignoring spaces)".  This only works
if there is a single comment on the line, and was often surprising
to users.  The new rule allows any number of whitespace-separated
comments on the line.

Bug: 41756
Change-Id: I6030086226e1eeece59643c29dbb4361668b4bd6
RELEASE-NOTES-1.22
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
tests/parser/parserTests.txt