mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 20:09:44 +00:00
DAT-2866 citation error wont be showing up when partial parse is run
This commit is contained in:
parent
e476e7c07f
commit
4e6298f881
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue