* 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

@ -434,7 +434,18 @@ function wfCite() {
function parse( $in ) { function parse( $in ) {
global $wgTitle; 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(); $text = $ret->getText();
return $this->fixTidy( $text ); return $this->fixTidy( $text );