{
return '<span class="error">Node-count limit exceeded</span>';
}
+ if ( $depth > $this->parser->mOptions->mMaxPPExpandDepth ) {
+ return '<span class="error">Expansion depth limit exceeded</span>';
+ }
+ ++$depth;
$outStack = array( '', '' );
$iteratorStack = array( false, $root );
$titleText = $this->title->getPrefixedDBkey();
$this->parser->mHeadings[] = array( $titleText, $bits['i'] );
$serial = count( $this->parser->mHeadings ) - 1;
- $marker = "{$this->parser->mUniqPrefix}-h-$serial-{$this->parser->mMarkerSuffix}";
+ $marker = "{$this->parser->mUniqPrefix}-h-$serial-" . Parser::MARKER_SUFFIX;
$s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] );
$this->parser->mStripState->general->setPair( $marker, '' );
$out .= $s;
}
}
}
+ --$depth;
return $outStack[0];
}