Commits

Frank Bennett committed 3fcae20

Update CHANGES.txt, bundle code to reflect recent checkins (version in build.js bumped in previous checkin).

  • Participants
  • Parent commits 2a91f69
  • Tags 1.0.159

Comments (0)

Files changed (3)

 Summary of changes to citeproc-js since version 1.0.0 release.
 
 ==========================
+Changes in version 1.0.159
+==========================
+
+------------------------------------
+Mishandled or unimplemented features
+------------------------------------
+
+- Run processor in a try/catch to prevent
+  a crash during preview from blocking
+  reconstruction of the registry.
+
+- Eliminate nesting closure that was causing
+  a non-fatal tag mismatch.
+
+- Force all-uppercase terms to lowercase
+  (a hack that really should not be necessary,
+  and may not be required with recent fixes).
+
+
+==========================
 Changes in version 1.0.158
 ==========================
 
 };
 CSL.Engine = function (sys, style, lang, forceLang) {
 	var attrs, langspec, localexml, locale;
-	this.processor_version = "1.0.158";
+	this.processor_version = "1.0.159";
 	this.csl_version = "1.0";
 	this.sys = sys;
 	this.sys.xml = new CSL.System.Xml.Parsing();
 	return this.nodeList[this.depth][1];
 };
 CSL.Engine.prototype.getTerm = function (term, form, plural, gender, loose) {
+	if (term && term.match(/[A-Z]/) && term === term.toUpperCase()) {
+		CSL.debug("Warning: term key is in uppercase form: "+term);
+		term = term.toLowerCase();
+	}
 	var ret = CSL.Engine.getField(CSL.LOOSE, this.locale[this.opt.lang].terms, term, form, plural, gender);
 	if (typeof ret === "undefined") {
 		ret = CSL.Engine.getField(CSL.STRICT, this.locale[this.opt.lang].terms, term, form, plural, gender);
 	}
 	var ret = [];
 	if (flag === CSL.PREVIEW) {
-		ret = this.process_CitationCluster.call(this, citation.sortedItems, citation.citationID);
+		try {
+			ret = this.process_CitationCluster.call(this, citation.sortedItems, citation.citationID);
+		} catch (e) {
+			CSL.error("Error running CSL processor for preview");
+		}
 		this.registry.citationreg.citationByIndex = oldCitationList;
 		this.registry.citationreg.citationById = {};
 		for (i = 0, ilen = oldCitationList.length; i < ilen; i += 1) {
 		}
 		var end_key = new CSL.Token("key", CSL.END);
 		func = function (state, Item) {
-			state.output.closeLevel("empty");
-		};
-		end_key.execs.push(func);
-		func = function (state, Item) {
 			var keystring = state.output.string(state, state.output.queue);
 			if ("" === keystring) {
 				keystring = undefined;

File demo/citeproc.js

 };
 CSL.Engine = function (sys, style, lang, forceLang) {
 	var attrs, langspec, localexml, locale;
-	this.processor_version = "1.0.158";
+	this.processor_version = "1.0.159";
 	this.csl_version = "1.0";
 	this.sys = sys;
 	this.sys.xml = new CSL.System.Xml.Parsing();
 	return this.nodeList[this.depth][1];
 };
 CSL.Engine.prototype.getTerm = function (term, form, plural, gender, loose) {
+	if (term && term.match(/[A-Z]/) && term === term.toUpperCase()) {
+		CSL.debug("Warning: term key is in uppercase form: "+term);
+		term = term.toLowerCase();
+	}
 	var ret = CSL.Engine.getField(CSL.LOOSE, this.locale[this.opt.lang].terms, term, form, plural, gender);
 	if (typeof ret === "undefined") {
 		ret = CSL.Engine.getField(CSL.STRICT, this.locale[this.opt.lang].terms, term, form, plural, gender);
 	}
 	var ret = [];
 	if (flag === CSL.PREVIEW) {
-		ret = this.process_CitationCluster.call(this, citation.sortedItems, citation.citationID);
+		try {
+			ret = this.process_CitationCluster.call(this, citation.sortedItems, citation.citationID);
+		} catch (e) {
+			CSL.error("Error running CSL processor for preview");
+		}
 		this.registry.citationreg.citationByIndex = oldCitationList;
 		this.registry.citationreg.citationById = {};
 		for (i = 0, ilen = oldCitationList.length; i < ilen; i += 1) {
 		}
 		var end_key = new CSL.Token("key", CSL.END);
 		func = function (state, Item) {
-			state.output.closeLevel("empty");
-		};
-		end_key.execs.push(func);
-		func = function (state, Item) {
 			var keystring = state.output.string(state, state.output.queue);
 			if ("" === keystring) {
 				keystring = undefined;