mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-11 06:36:17 +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;
|