mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-11 06:36:17 +00:00
05cb13ddf9
This allows us to finish the cleanup started in 0b3bb10 and inline setupProcessors. Change-Id: Ia7840091607e9a75153031b5db7600d5a0018da6
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;
|