Remove vestigial reset() methods in Cite.

Cite is now stateless and should remain so!

Change-Id: Ib90cb1da8cb809f6fec9410ff6fb00c32e276dcf
This commit is contained in:
C. Scott Ananian 2015-04-30 15:23:03 -04:00
parent 4c4f5ce368
commit 4ca968a95c

View file

@ -64,15 +64,8 @@ function processExtSource(manager, extToken, opts) {
*/
function Ref(cite) {
this.cite = cite;
this.reset();
}
/**
* Reset state before each top-level parse -- this lets us share a pipeline
* to parse unrelated pages.
*/
Ref.prototype.reset = function() { };
function hasRef(node) {
var c = node.firstChild;
while (c) {
@ -286,11 +279,8 @@ ReferencesData.prototype.add = function(groupName, refName, about, skipLinkback)
function References(cite) {
this.cite = cite;
this.reset();
}
References.prototype.reset = function() {};
/**
* Sanitize the references tag and convert it into a meta-token
*/
@ -538,13 +528,6 @@ var Cite = function() {
this.references = new References(this);
};
Cite.prototype.resetState = function(opts) {
if (opts && opts.toplevel) {
this.ref.reset();
this.references.reset();
}
};
if (typeof module === "object") {
module.exports.Cite = Cite;
module.exports.ReferencesData = ReferencesData;