From 34e62cad87127f6ff4ab12c0405376ed7158dc9f Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 12 Feb 2012 13:36:12 +0800 Subject: [PATCH 1/3] Update citeproc-js to version 1.0.279 --- chrome/content/zotero/xpcom/citeproc.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index cbbfc4439f..fc64f51060 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -2133,7 +2133,7 @@ CSL.DateParser = function () { }; CSL.Engine = function (sys, style, lang, forceLang) { var attrs, langspec, localexml, locale; - this.processor_version = "1.0.278"; + this.processor_version = "1.0.279"; this.csl_version = "1.0"; this.sys = sys; this.sys.xml = new CSL.System.Xml.Parsing(); @@ -7506,6 +7506,8 @@ CSL.Node.text = { if (parseInt(m[1]) >= parseInt(m[2])) { locator = m[1] + "-" + m[2]; } + } else { + locator = locator.replace(/\u2013/g,"-"); } state.output.append(locator, this, false, false, true); } @@ -7527,6 +7529,15 @@ CSL.Node.text = { func = function (state, Item) { var value = state.getVariable(Item, "page", form); if (value) { + value = value.replace(/--*/g,"\u2013"); + var m = value.match(/^([0-9]+)\s*\u2013\s*([0-9]+)$/) + if (m) { + if (parseInt(m[1]) >= parseInt(m[2])) { + value = m[1] + "-" + m[2]; + } + } else { + value = value.replace(/\u2013/g,"-"); + } value = state.fun.page_mangler(value); state.output.append(value, this, false, false, true); } From 9a3f3b70268211b748717ee3a138be81a9ceb293 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 12 Feb 2012 04:42:02 -0500 Subject: [PATCH 2/3] Fix for large Z pane min-height --- chrome/content/zotero/itemPane.xul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/itemPane.xul b/chrome/content/zotero/itemPane.xul index 50a8e4d497..c9facea7de 100644 --- a/chrome/content/zotero/itemPane.xul +++ b/chrome/content/zotero/itemPane.xul @@ -109,7 +109,7 @@ Choose the version of the item to use as the master item: - + From 0a25cdad96ca696537d07699025181a69487ccd9 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 12 Feb 2012 17:22:12 -0500 Subject: [PATCH 3/3] Fix typo --- chrome/content/zotero/xpcom/integration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index a8f89e74dd..cfcd6dba0d 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1626,7 +1626,7 @@ Zotero.Integration.Fields.prototype.addEditCitation = function(field, callback) try { session.lookupItems(citation); } catch(e) { - if(e instanceof MissingItemException) { + if(e instanceof Zotero.Integration.MissingItemException) { citation.citationItems = []; } else { throw e;