DAT-2866 citation error wont be showing up when partial parse is run

This commit is contained in:
idradm 2015-06-03 13:40:26 +02:00
parent e476e7c07f
commit 4e6298f881

View file

@ -23,10 +23,17 @@ class MediaWikiParserService implements ExternalParser {
//fix for first item list elements
$wikitext = "\n" . $wikitext;
}
$parsedText = $this->parser->parse( $wikitext, $this->getParserTitle(), $this->getParserOptions(),
false, false )->getText();
//save current options state, as it'll be overridden by new instance when parse is invoked
$options = $this->getParserOptions();
$tmpOptions = clone $options;
$tmpOptions->setIsPartialParse( true );
$output = $this->parser->parse( $wikitext, $this->getParserTitle(), $tmpOptions, false, false )->getText();
//restore options state
$this->parser->Options( $options );
wfProfileOut( __METHOD__ );
return $parsedText;
return $output;
}
/**