This is a popular 'misuse' of the padleft/padright functions, which was not
tested in the main parser tests so far.
Change-Id: Icda02b34101c8c35b13c1e84d9f565867148d8d8
This whitespaces causes an extra empty paragraph between text and transcluding a special page.
When a heading precedes a transcluded special page, there is no difference and it's fine with or without this whitespace.
See for example http://incubator.wikimedia.org/w/index.php?title=Incubator:Sandbox&oldid=822299
Change-Id: I6b06006d921368619d3969660c244176344e8aff
The patch adds an optional parameter |link= to the <gallery>
tag. This will allow for images to link to other pages and
externals urls instead of being hardlinked to the image file
that is displayed in the gallery.
Here are a couple of examples.
Link as WikiLink:
<gallery>
File:20120106_001.jpg|link=Main_Page
</gallery>
Link as absolute URI:
<gallery>
File:20120106_001.jpg|my caption|alt=my alt
text|link=http://bugzilla.wikimedia.org
</gallery>
this would cause the link on the thumbnails rendered by the gallery tag to link
to a custom page/url instead of the actual media/image.
a link should be an internal wiki link or an absolute uri as shown in the examples.
Change-Id: I21b276ad5c7a8df13b3a716957d23fd53c37d29e
especially the surprising start-of-line behavior. This test will
be used to implement matching behavior in Parsoid.
Change-Id: Ibfa13dfd2be2d62c285449cb090e2b112fe30f9b
Also add explicit Title::getPrefixedText() in
CoreParserFunctions::special, so that method does not rely on
Title::toString.
Change-Id: I1d041b11386bff15811e19de47a662e5ed7a2b07
Adding <bdi> to $htmlpairsStatic to allow using this tag.
Adds parser test case to confirm that <bdi> makes it through with 'lang' attribute.
This updated patchset also adds <bdi> to the attribute whitelist with the basic common attribute; allows 'lang' and such to get through.
Change-Id: Ib7e6553f017837cb1d49d5718e288228c17392c0
* Introduced Parser::killMarkers() based on the concept from StringFunctions. Used it in cases where markerStripCallback() doesn't make sense semantically, namely grammar, padleft, padright and anchorencode. Used markerStripCallback() in other cases.
* Changed headline unstrip order as suggested by P.Copp on bug 18295
* In CPF::lc() and CPF::uc(), removed the is_callable(). This was a temporary testing hack committed by me in r30109, which allowed me to do differential testing against a copy of the parser from before that revision.
Fixes the problems with r102179 and r102179, as there are
valid tags which begin the same, which meant they were not removed from
the TOC (the second regex, intended to remove tag parameters, then converted
<img or <blockquote> into <i> / <b>).
The same problem existed in the original regex, but as there are no valid
tags which begin with sup or sub, it never happened).
Added comment explaining the tocline regex, and added a bunch of parser tests.
the includes/parser/MediaWikiParserTest.php test case
* Drop now unused various test recorder options -- phpunit outputs its data in lots of machine-readable formats, use those if you need to work with
test data
* There's still a lot of duplication between NewParserTest::setUp() and MediaWikiTestCase, but hey one step at a time ;-)
* All tests pass for me (make phpunit && make parser)
* Also pass the line number
* Removed useless usage of $title when throwing the exception about invalid since that variable is always null
* Added $ignoreDuplicate parameter to ParserTest::addArticle()
* Refactored FileRepo::initZones() to require the specific zones; nothing was using it differently.
* Removed deleted zone check in deleteBatch(), a similar error will instead trigger with the initZones() call as needed.
* Added $wgLocalFileRepo comment.
* Updated tests.
r100932 disabled two 'Bad images' tests but did so by also erasing the
test name. Hence we could no more tests them even with --run-disabled.
Test plan:
==========
$ php parserTests.php --run-disabled --filter 'Bad images'
--> output two tests failing as expected
$ php parserTests.php --filter 'Bad images'
--> output no tests found
$ php parserTests.php --quiet
--> ALL PASSED :-)
Readin the text case, I though 'pre' was some kind of magic keyword to render
a preformatted text. It happens it is just a text. Replacing it with something
that will not confuse me or others.
follow up r103933