mediawiki-extensions-Cite/lib/ext/Cite/RefProcessor.js
Arlo Breault 05cb13ddf9 Make extensions with post-processors return constructors
This allows us to finish the cleanup started in 0b3bb10 and inline
setupProcessors.

Change-Id: Ia7840091607e9a75153031b5db7600d5a0018da6
2019-04-03 18:44:21 +00:00

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;