1. pombredanne
  2. citeproc-js

Commits

Frank Bennett  committed 6a4ebfc

Force all-uppercase terms to all lowercase (a hack, should not be necessary, and may not be, given other recent fixes).

  • Participants
  • Parent commits 3470ff0
  • Branches default

Comments (0)

Files changed (1)

File src/build.js

View file
  • Ignore whitespace
 
 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();
 };
 
 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);