mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-18 17:50:43 +00:00
26 lines
588 B
PHP
26 lines
588 B
PHP
|
<?php
|
||
|
// phpcs:ignoreFile
|
||
|
// phpcs:disable Generic.Files.LineLength.TooLong
|
||
|
/* REMOVE THIS COMMENT AFTER PORTING */
|
||
|
namespace Parsoid;
|
||
|
|
||
|
use Parsoid\References as References;
|
||
|
use Parsoid\ReferencesData as ReferencesData;
|
||
|
|
||
|
/**
|
||
|
* wt -> html DOM PostProcessor
|
||
|
*
|
||
|
* @class
|
||
|
*/
|
||
|
class RefProcessor {
|
||
|
public function run( $body, $env, $options, $atTopLevel ) {
|
||
|
if ( $atTopLevel ) {
|
||
|
$refsData = new ReferencesData( $env );
|
||
|
References::_processRefs( $env, $refsData, $body );
|
||
|
References::insertMissingReferencesIntoDOM( $refsData, $body );
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$module->exports = $RefProcessor;
|