From db2fc7d0ba6cad44a7ae2b3aceac571387b779c1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 3 Oct 2016 11:54:25 -0400 Subject: [PATCH 1/4] Update translators --- resource/schema/repotime.txt | 2 +- translators | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/schema/repotime.txt b/resource/schema/repotime.txt index 5edf32984..92a72e807 100644 --- a/resource/schema/repotime.txt +++ b/resource/schema/repotime.txt @@ -1 +1 @@ -2016-09-10 12:00:00 +2016-10-01 04:05:00 diff --git a/translators b/translators index e04633bae..4273554af 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit e04633baeaac2c62eddb4435e517ae7d51c89a73 +Subproject commit 4273554afc20fe593b30faa6196edac9e755a7fa From c477d482bf510196285e6f8f6d67a697be86c8ca Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 6 Oct 2016 01:33:03 -0400 Subject: [PATCH 2/4] Update citeproc-js to 1.1.137 --- chrome/content/zotero/xpcom/citeproc.js | 34 +++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index 180287a83..f2a7b5c5a 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -23,7 +23,7 @@ * respectively. */ var CSL = { - PROCESSOR_VERSION: "1.1.136", + PROCESSOR_VERSION: "1.1.137", CONDITION_LEVEL_TOP: 1, CONDITION_LEVEL_BOTTOM: 2, PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/, @@ -126,7 +126,8 @@ var CSL = { "hearing": true, "gazette": true, "report": true, - "regulation": true + "regulation": true, + "standard": true }, NestedBraces: [ ["(", "["], @@ -227,7 +228,7 @@ var CSL = { } return lst.join("-"); }, - parseNoteFieldHacks: function(Item, allowDateOverride) { + parseNoteFieldHacks: function(Item, validFieldsForType, allowDateOverride) { if ("string" !== typeof Item.note) return; var elems = []; var lines = Item.note.split('\n'); @@ -254,6 +255,7 @@ var CSL = { } } lines = lines.join('\n').split('\n'); + var offset = 0; var names = {}; for (var i=0,ilen=lines.length;i -1) { if (allowDateOverride) { Item[key] = {raw: val}; - lines[i] = ""; + if (!validFieldsForType || (validFieldsForType[key] && val.match(/^[0-9]{4}(?:-[0-9]{1,2}(?:-[0-9]{1,2})*)*$/))) { + lines[i] = ""; + } } } else if (!Item[key]) { if (CSL.NAME_VARIABLES.indexOf(key) > -1) { @@ -293,13 +298,25 @@ var CSL = { } else { Item[key] = val; } - lines[i] = ""; + if (!validFieldsForType || validFieldsForType[key]) { + lines[i] = ""; + } } } for (var key in names) { Item[key] = names[key]; } - Item.note = lines.join("").trim(); + if (validFieldsForType) { + if (lines[offset].trim()) { + lines[offset] = '\n' + lines[offset] + } + for (var i=offset-1;i>-1;i--) { + if (!lines[i].trim()) { + lines = lines.slice(0, i).concat(lines.slice(i + 1)); + } + } + } + Item.note = lines.join("\n").trim(); }, GENDERS: ["masculine", "feminine"], ERROR_NO_RENDERED_FORM: 1, @@ -2840,7 +2857,7 @@ CSL.Engine.prototype.retrieveItem = function (id) { } } if (this.opt.development_extensions.field_hack && Item.note) { - CSL.parseNoteFieldHacks(Item, this.opt.development_extensions.allow_field_hack_date_override); + CSL.parseNoteFieldHacks(Item, false, this.opt.development_extensions.allow_field_hack_date_override); } for (var i = 1, ilen = CSL.DATE_VARIABLES.length; i < ilen; i += 1) { var dateobj = Item[CSL.DATE_VARIABLES[i]]; @@ -6978,9 +6995,6 @@ CSL.Node.group = { state.buildTokenLists(myNodes[i], state.juris[jurisdiction][myName]); state.configureTokenList(state.juris[jurisdiction][myName]); } - if (macroCount < Object.keys(state.juris[jurisdiction].types).length) { - throw "CSL ERROR: Incomplete jurisdiction style module for: " + jurisdiction; - } } } for (var i=0,ilen=jurisdictionList.length;i Date: Tue, 11 Oct 2016 22:39:17 -0400 Subject: [PATCH 3/4] Set multiprocessCompatible to false This is the default, but it looks like Mozilla may start enabling e10s for extensions that don't explicitly set this to false at some point [1] before they turn it on in all cases. [1] https://wiki.mozilla.org/Electrolysis#Add-ons_Schedule --- install.rdf | 1 + 1 file changed, 1 insertion(+) diff --git a/install.rdf b/install.rdf index f32ad0d4a..8812ebe91 100644 --- a/install.rdf +++ b/install.rdf @@ -18,6 +18,7 @@ chrome://zotero/content/about.xul chrome://zotero/skin/zotero-new-z-48px.png https://www.zotero.org/download/update-source.rdf + false 2 From 775d39f93a7f72f0989575efd8a9dc7f36cb9a9b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 12 Oct 2016 13:22:15 -0400 Subject: [PATCH 4/4] Update citeproc-js to 1.1.138 --- chrome/content/zotero/xpcom/citeproc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index f2a7b5c5a..868b3bcc3 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -23,7 +23,7 @@ * respectively. */ var CSL = { - PROCESSOR_VERSION: "1.1.137", + PROCESSOR_VERSION: "1.1.138", CONDITION_LEVEL_TOP: 1, CONDITION_LEVEL_BOTTOM: 2, PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/, @@ -13549,7 +13549,7 @@ CSL.Engine.prototype.processNumber = function (node, ItemObject, variable, type) info.plural = 0; info.labelVisibility = false; } - var m = val.match(/^([a-zA-Z]0*)([0-9]+(?:[a-zA-Z]*|[-,a-zA-Z]+))$/); + var m = val.match(/^([a-zA-Z0]*)([0-9]+(?:[a-zA-Z]*|[-,a-zA-Z]+))$/); if (m) { info.particle = m[1]; info.value = m[2];