$this->mLangLinkLanguages = [];
$this->currentRevisionCache = null;
- $this->mStripState = new StripState;
+ $this->mStripState = new StripState( $this );
# Clear these on every parse, T6549
$this->mTplRedirCache = $this->mTplDomCache = [];
$this->mOutput->setLimitReportData( 'limitreport-expensivefunctioncount',
[ $this->mExpensiveFunctionCount, $this->mOptions->getExpensiveParserFunctionLimit() ]
);
+
+ foreach ( $this->mStripState->getLimitReport() as list( $key, $value ) ) {
+ $this->mOutput->setLimitReportData( $key, $value );
+ }
+
Hooks::run( 'ParserLimitReportPrepare', [ $this, $this->mOutput ] );
$limitReport = "NewPP limit report\n";
$dtrail = '';
- # Set linktype for CSS - if URL==text, link is essentially free
- $linktype = ( $text === $url ) ? 'free' : 'text';
+ # Set linktype for CSS
+ $linktype = 'text';
# No link text, e.g. [http://domain.tld/some.link]
if ( $text == '' ) {
* unserializeHalfParsedText(). The text can then be safely incorporated into
* the return value of a parser hook.
*
+ * @deprecated since 1.31
* @param string $text
*
* @return array
*/
public function serializeHalfParsedText( $text ) {
+ wfDeprecated( __METHOD__, '1.31' );
$data = [
'text' => $text,
'version' => self::HALF_PARSED_VERSION,
* If the $data array has been stored persistently, the caller should first
* check whether it is still valid, by calling isValidHalfParsedText().
*
+ * @deprecated since 1.31
* @param array $data Serialized data
* @throws MWException
* @return string
*/
public function unserializeHalfParsedText( $data ) {
+ wfDeprecated( __METHOD__, '1.31' );
if ( !isset( $data['version'] ) || $data['version'] != self::HALF_PARSED_VERSION ) {
throw new MWException( __METHOD__ . ': invalid version' );
}
* serializeHalfParsedText(), is compatible with the current version of the
* parser.
*
+ * @deprecated since 1.31
* @param array $data
*
* @return bool
*/
public function isValidHalfParsedText( $data ) {
+ wfDeprecated( __METHOD__, '1.31' );
return isset( $data['version'] ) && $data['version'] == self::HALF_PARSED_VERSION;
}