mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-21 11:02:51 +00:00
22 lines
446 B
JavaScript
22 lines
446 B
JavaScript
|
'use strict';
|
||
|
|
||
|
const References = require('./References.js');
|
||
|
const ReferencesData = require('./ReferencesData.js');
|
||
|
|
||
|
/**
|
||
|
* wt -> html DOM PostProcessor
|
||
|
*
|
||
|
* @class
|
||
|
*/
|
||
|
class RefProcessor {
|
||
|
run(body, env, options, atTopLevel) {
|
||
|
if (atTopLevel) {
|
||
|
var refsData = new ReferencesData(env);
|
||
|
References._processRefs(env, refsData, body);
|
||
|
References.insertMissingReferencesIntoDOM(refsData, body);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = RefProcessor;
|