* Passing false to Parser::parse() to not make it clear its state, this along

with the hook in Parser::clearState() makes sure the state of the Object is
  kept in sync with the state of the parser, i.e. works correctly for dumpHTML
This commit is contained in:
Ævar Arnfjörð Bjarmason 2005-12-25 00:27:19 +00:00
parent b271104237
commit b50e5ca190

View file

@ -433,8 +433,19 @@ function wfCite() {
*/
function parse( $in ) {
global $wgTitle;
$ret = $this->mParser->parse( $in, $wgTitle, $this->mParserOptions, false );
$ret = $this->mParser->parse(
$in,
$wgTitle,
$this->mParserOptions,
// Avoid whitespace buildup
false,
// Important, otherwise $this->clearState()
// would get run every time <ref> or
// <references> is called, fucking the whole
// thing up.
false
);
$text = $ret->getText();
return $this->fixTidy( $text );