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:
Arlo Breault 2021-04-01 13:57:54 -04:00
parent 198c91f768
commit c08dc34b1d

View file

@ -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 ];
}
}
/**