Skip to content

Commit

Permalink
Bump version, update CHANGES, bundle as 1.1.102
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed May 5, 2016
1 parent a79854f commit 3453852
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 13 deletions.
9 changes: 9 additions & 0 deletions CHANGES.txt
@@ -1,5 +1,14 @@
Summary of changes to citeproc-js since version 1.0.0 release.

==========================
Changes in version 1.1.102
==========================

- Append citationID to the citation arrays returned
by processCitationCluster(). Depending on document
addressing capabilities, this can greatly simplify
the matching of updates to document citations.

==========================
Changes in version 1.1.101
==========================
Expand Down
20 changes: 14 additions & 6 deletions citeproc.js
Expand Up @@ -34,7 +34,7 @@ if (!Array.indexOf) {
};
}
var CSL = {
PROCESSOR_VERSION: "1.1.101",
PROCESSOR_VERSION: "1.1.102",
CONDITION_LEVEL_TOP: 1,
CONDITION_LEVEL_BOTTOM: 2,
PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/,
Expand Down Expand Up @@ -206,6 +206,15 @@ var CSL = {
this["container-phrase"] = {};
this["title-phrase"] = {};
},
normalizeLocaleStr: function(str) {
if (!str) return;
var lst = str.split('-');
lst[0] = lst[0].toLowerCase();
if (lst[1]) {
lst[1] = lst[1].toUpperCase();
}
return lst.join("-");
},
parseNoteFieldHacks: function(Item, validFieldsForType) {
if ("string" !== typeof Item.note) return;
var elems = [];
Expand Down Expand Up @@ -2430,9 +2439,11 @@ CSL.Engine = function (sys, style, lang, forceLang) {
}
if (lang) {
lang = lang.replace("_", "-");
lang = CSL.normalizeLocaleStr(lang);
}
if (this.opt["default-locale"][0]) {
this.opt["default-locale"][0] = this.opt["default-locale"][0].replace("_", "-");
this.opt["default-locale"][0] = CSL.normalizeLocaleStr(this.opt["default-locale"][0]);
}
if (lang && forceLang) {
this.opt["default-locale"] = [lang];
Expand Down Expand Up @@ -5006,6 +5017,7 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
obj = [];
obj.push(mycitation.properties.index);
obj.push(this.process_CitationCluster.call(this, mycitation.sortedItems, mycitation.citationID));
obj.push(mycitation.citationID);
ret.push(obj);
}
this.tmp.taintedItemIDs = {};
Expand All @@ -5016,6 +5028,7 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
obj = [];
obj.push(citationsPre.length);
obj.push(this.process_CitationCluster.call(this, sortedItems, citation.citationID));
obj.push(citation.citationID);
ret.push(obj);
ret.sort(function (a, b) {
if (a[0] > b[0]) {
Expand Down Expand Up @@ -5995,11 +6008,6 @@ CSL.localeResolve = function (langstr, defaultLocale) {
};
CSL.Engine.prototype.localeConfigure = function (langspec, beShy) {
var localexml;
if (this.opt.development_extensions.normalize_lang_keys_to_lowercase) {
langspec.best = langspec.best.toLowerCase();
langspec.bare = langspec.bare.toLowerCase();
langspec.base = langspec.base.toLowerCase();
}
if (beShy && this.locale[langspec.best]) {
return;
}
Expand Down
20 changes: 14 additions & 6 deletions citeproc_with_e4x.js
Expand Up @@ -34,7 +34,7 @@ if (!Array.indexOf) {
};
}
var CSL = {
PROCESSOR_VERSION: "1.1.101",
PROCESSOR_VERSION: "1.1.102",
CONDITION_LEVEL_TOP: 1,
CONDITION_LEVEL_BOTTOM: 2,
PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/,
Expand Down Expand Up @@ -206,6 +206,15 @@ var CSL = {
this["container-phrase"] = {};
this["title-phrase"] = {};
},
normalizeLocaleStr: function(str) {
if (!str) return;
var lst = str.split('-');
lst[0] = lst[0].toLowerCase();
if (lst[1]) {
lst[1] = lst[1].toUpperCase();
}
return lst.join("-");
},
parseNoteFieldHacks: function(Item, validFieldsForType) {
if ("string" !== typeof Item.note) return;
var elems = [];
Expand Down Expand Up @@ -2431,9 +2440,11 @@ CSL.Engine = function (sys, style, lang, forceLang) {
}
if (lang) {
lang = lang.replace("_", "-");
lang = CSL.normalizeLocaleStr(lang);
}
if (this.opt["default-locale"][0]) {
this.opt["default-locale"][0] = this.opt["default-locale"][0].replace("_", "-");
this.opt["default-locale"][0] = CSL.normalizeLocaleStr(this.opt["default-locale"][0]);
}
if (lang && forceLang) {
this.opt["default-locale"] = [lang];
Expand Down Expand Up @@ -5007,6 +5018,7 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
obj = [];
obj.push(mycitation.properties.index);
obj.push(this.process_CitationCluster.call(this, mycitation.sortedItems, mycitation.citationID));
obj.push(mycitation.citationID);
ret.push(obj);
}
this.tmp.taintedItemIDs = {};
Expand All @@ -5017,6 +5029,7 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
obj = [];
obj.push(citationsPre.length);
obj.push(this.process_CitationCluster.call(this, sortedItems, citation.citationID));
obj.push(citation.citationID);
ret.push(obj);
ret.sort(function (a, b) {
if (a[0] > b[0]) {
Expand Down Expand Up @@ -5996,11 +6009,6 @@ CSL.localeResolve = function (langstr, defaultLocale) {
};
CSL.Engine.prototype.localeConfigure = function (langspec, beShy) {
var localexml;
if (this.opt.development_extensions.normalize_lang_keys_to_lowercase) {
langspec.best = langspec.best.toLowerCase();
langspec.bare = langspec.bare.toLowerCase();
langspec.base = langspec.base.toLowerCase();
}
if (beShy && this.locale[langspec.best]) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/load.js
Expand Up @@ -45,7 +45,7 @@ if (!Array.indexOf) {

var CSL = {

PROCESSOR_VERSION: "1.1.101",
PROCESSOR_VERSION: "1.1.102",

CONDITION_LEVEL_TOP: 1,

Expand Down

0 comments on commit 3453852

Please sign in to comment.