in behavior based on the order tags are loaded.
* (bug 885) Pre-save transform no longer silently appends close tags
* Pre-save transform no longer changes the case of close tags
+* (bug 6164) Fix regression with <gallery> resetting <ref> state
== Compatibility ==
* 'A tree'.
*/
function renderImageGallery( $text ) {
- # Setup the parser
- $parserOptions = new ParserOptions;
- $localParser = new Parser();
-
$ig = new ImageGallery();
$ig->setShowBytes( false );
$ig->setShowFilename( false );
$label = '';
}
- $pout = $localParser->parse( $label , $this->mTitle, $parserOptions );
+ $pout = $this->parse( $label,
+ $this->mTitle,
+ $this->mOptions,
+ false, // Strip whitespace...?
+ false // Don't clear state!
+ );
$html = $pout->getText();
$ig->add( new Image( $nt ), $html );
if ( $nt->getNamespace() == NS_IMAGE ) {
$this->mOutput->addImage( $nt->getDBkey() );
}
-
- # Register links with the parent parser
- foreach( $pout->getLinks() as $ns => $keys ) {
- foreach( $keys as $dbk => $id )
- $this->mOutput->addLink( Title::makeTitle( $ns, $dbk ), $id );
- }
-
}
return $ig->toHTML();
}