mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-30 11:06:55 +00:00
Return an extension tag when preprocessing a parser function
Help out Parsoid since it doesn't have support for the "isHTML" flag. Bug: T257344 Bug: T279094 Change-Id: Ia3295e74628bb45912e208c38da8c85cdb736d0b
This commit is contained in:
parent
198c91f768
commit
c08dc34b1d
|
@ -112,9 +112,14 @@ class CategoryTreeHooks {
|
|||
$argv[$k] = $v;
|
||||
}
|
||||
|
||||
// now handle just like a <categorytree> tag
|
||||
$html = self::parserHook( $cat, $argv, $parser );
|
||||
return [ $html, 'noparse' => true, 'isHTML' => true ];
|
||||
if ( $parser->getOutputType() === Parser::OT_PREPROCESS ) {
|
||||
return Html::openElement( 'categorytree', $argv ) .
|
||||
$cat . Html::closeElement( 'categorytree' );
|
||||
} else {
|
||||
// now handle just like a <categorytree> tag
|
||||
$html = self::parserHook( $cat, $argv, $parser );
|
||||
return [ $html, 'noparse' => true, 'isHTML' => true ];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue