mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
DOMPostProcess: Don't run extension dom processors on nested pipelines
* There is really no reason to run this once per nested pipeline since there is a lot of other processing that is skipped on nested pipelines. * Eliminated the 'topLevel' arg to the wtPostProcess extension handler since that is no longer relevant. * We may need to explicitly document this in the extension API spec. Change-Id: Ib2508df736aeab9c649138249228647c00aaaef5
This commit is contained in:
parent
39e08e48fd
commit
4ed31f499e
|
@ -17,15 +17,13 @@ class RefProcessor extends DOMProcessor {
|
|||
* @inheritDoc
|
||||
*/
|
||||
public function wtPostprocess(
|
||||
ParsoidExtensionAPI $extApi, Node $node, array $options, bool $atTopLevel
|
||||
ParsoidExtensionAPI $extApi, Node $node, array $options
|
||||
): void {
|
||||
if ( $atTopLevel ) {
|
||||
$refsData = new ReferencesData();
|
||||
References::processRefs( $extApi, $refsData, $node );
|
||||
References::insertMissingReferencesIntoDOM( $extApi, $refsData, $node );
|
||||
if ( count( $refsData->embeddedErrors ) > 0 ) {
|
||||
References::addEmbeddedErrors( $extApi, $refsData, $node );
|
||||
}
|
||||
$refsData = new ReferencesData();
|
||||
References::processRefs( $extApi, $refsData, $node );
|
||||
References::insertMissingReferencesIntoDOM( $extApi, $refsData, $node );
|
||||
if ( count( $refsData->embeddedErrors ) > 0 ) {
|
||||
References::addEmbeddedErrors( $extApi, $refsData, $node );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue