Commits

Frank Bennett committed 90017cf

Bump version in build.js, update CHANGES.txt, and bundle code to reflect recent checkins.

Comments (0)

Files changed (4)

 Summary of changes to citeproc-js since version 1.0.0 release.
 
 ==========================
+Changes in version 1.0.157
+==========================
+
+------------------------------------
+Mishandled or unimplemented features
+------------------------------------
+
+- A more comprehensive fix for "sub verbo" -> "sub-verbo",
+  that will work with match="all" with both forms of the
+  term.
+
+
+==========================
 Changes in version 1.0.156
 ==========================
 
 };
 CSL.Engine = function (sys, style, lang, forceLang) {
 	var attrs, langspec, localexml, locale;
-	this.processor_version = "1.0.156";
+	this.processor_version = "1.0.157";
 	this.csl_version = "1.0";
 	this.sys = sys;
 	this.sys.xml = new CSL.System.Xml.Parsing();
 	for (pos = 0, len = this.sys.xml.numberofnodes(nodes); pos < len; pos += 1) {
 		term = nodes[pos];
 		termname = this.sys.xml.getAttributeValue(term, 'name');
+		if (termname === "sub verbo") {
+			termname = "sub-verbo";
+		}
 		if ("undefined" === typeof this.locale[lang_out].terms[termname]) {
 			this.locale[lang_out].terms[termname] = {};
 		}
 				this.strings.form = "long";
 			}
 			var func = function (state, Item, item) {
+				if (item && item.label === "sub verbo") {
+					item.label = "sub-verbo";
+				}
 				var termtxt = CSL.evaluateLabel(this, state, Item, item);
 				state.output.append(termtxt, this);
 			};
 	this.postponed_macro = arg;
 };
 CSL.Attributes["@term"] = function (state, arg) {
-	this.strings.term = arg;
+	if (arg === "sub verbo") {
+		this.strings.term = "sub-verbo";
+	} else {
+		this.strings.term = arg;
+	}
 };
 CSL.Attributes["@xmlns"] = function (state, arg) {};
 CSL.Attributes["@lang"] = function (state, arg) {
 	var func;
 	var trylabels = arg.replace("sub verbo", "sub-verbo");
 	trylabels = trylabels.split(/\s+/);
-	if (trylabels.indexOf("sub-verbo") > -1) {
-		trylabels.push("sub verbo");
-	}
 	if (["if",  "else-if"].indexOf(this.name) > -1) {
 		func = function (state, Item, item) {
 			var ret = [];
 			var label;
 			if ("undefined" === typeof item || !item.label) {
 				label = "page";
+			} else if (item.label === "sub verbo") {
+				label = "sub-verbo";
 			} else {
 				label = item.label;
 			}
 };
 CSL.Engine = function (sys, style, lang, forceLang) {
 	var attrs, langspec, localexml, locale;
-	this.processor_version = "1.0.156";
+	this.processor_version = "1.0.157";
 	this.csl_version = "1.0";
 	this.sys = sys;
 	this.sys.xml = new CSL.System.Xml.Parsing();
 	for (pos = 0, len = this.sys.xml.numberofnodes(nodes); pos < len; pos += 1) {
 		term = nodes[pos];
 		termname = this.sys.xml.getAttributeValue(term, 'name');
+		if (termname === "sub verbo") {
+			termname = "sub-verbo";
+		}
 		if ("undefined" === typeof this.locale[lang_out].terms[termname]) {
 			this.locale[lang_out].terms[termname] = {};
 		}
 				this.strings.form = "long";
 			}
 			var func = function (state, Item, item) {
+				if (item && item.label === "sub verbo") {
+					item.label = "sub-verbo";
+				}
 				var termtxt = CSL.evaluateLabel(this, state, Item, item);
 				state.output.append(termtxt, this);
 			};
 	this.postponed_macro = arg;
 };
 CSL.Attributes["@term"] = function (state, arg) {
-	this.strings.term = arg;
+	if (arg === "sub verbo") {
+		this.strings.term = "sub-verbo";
+	} else {
+		this.strings.term = arg;
+	}
 };
 CSL.Attributes["@xmlns"] = function (state, arg) {};
 CSL.Attributes["@lang"] = function (state, arg) {
 	var func;
 	var trylabels = arg.replace("sub verbo", "sub-verbo");
 	trylabels = trylabels.split(/\s+/);
-	if (trylabels.indexOf("sub-verbo") > -1) {
-		trylabels.push("sub verbo");
-	}
 	if (["if",  "else-if"].indexOf(this.name) > -1) {
 		func = function (state, Item, item) {
 			var ret = [];
 			var label;
 			if ("undefined" === typeof item || !item.label) {
 				label = "page";
+			} else if (item.label === "sub verbo") {
+				label = "sub-verbo";
 			} else {
 				label = item.label;
 			}
 
 CSL.Engine = function (sys, style, lang, forceLang) {
 	var attrs, langspec, localexml, locale;
-	this.processor_version = "1.0.156";
+	this.processor_version = "1.0.157";
 	this.csl_version = "1.0";
 	this.sys = sys;
 	this.sys.xml = new CSL.System.Xml.Parsing();