commit ffc02fb5836e178babd1e3df7bdb9cc6005b6105
parent 4aa855aba1416a3f323d3a810c235891d68edba5
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 11 Aug 2011 12:20:07 +0000
Update to citeproc-js 1.0.203
Diffstat:
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js
@@ -1924,7 +1924,7 @@ CSL.DateParser = function () {
};
CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale;
- this.processor_version = "1.0.202";
+ this.processor_version = "1.0.203";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@@ -3198,14 +3198,33 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
} else {
suprame = true;
}
- var prev_locator, curr_locator;
+ var prev, prev_locator, prev_label, curr_locator, curr_label;
if (ibidme) {
if (k > 0) {
- prev_locator = onecitation.sortedItems[(k - 1)][1].locator;
+ prev = onecitation.sortedItems[(k - 1)][1];
} else {
- prev_locator = citations[(j - 1)].sortedItems[0][1].locator;
+ prev = citations[(j - 1)].sortedItems[0][1];
+ }
+ if (prev.locator) {
+ if (prev.label) {
+ prev_label = prev.label;
+ } else {
+ prev_label = "";
+ }
+ prev_locator = "" + prev.locator + prev_label;
+ } else {
+ prev_locator = prev.locator;
+ }
+ if (item[1].locator) {
+ if (item[1].label) {
+ curr_label = item[1].label;
+ } else {
+ curr_label = "";
+ }
+ curr_locator = "" + item[1].locator + curr_label;
+ } else {
+ curr_locator = item[1].locator;
}
- curr_locator = item[1].locator;
}
if (ibidme && prev_locator && !curr_locator) {
ibidme = false;