Skip to content

Commit

Permalink
Bump version, update CHANGES, bundle as 1.2.30
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Dec 18, 2019
1 parent 978981a commit 1aa49dd
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
8 changes: 8 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,11 @@
=========================
Changes in version 1.2.30
=========================

- Accommodate citations with no items in author-only mode.

Report by Alf Eaton: https://github.com/Juris-M/citeproc-js/issues/127

=========================
Changes in version 1.2.29
=========================
Expand Down
17 changes: 11 additions & 6 deletions citeproc.js
Expand Up @@ -59,7 +59,7 @@ Copyright (c) 2009-2019 Frank Bennett

var CSL = {

PROCESSOR_VERSION: "1.2.29",
PROCESSOR_VERSION: "1.2.30",

error: function(str) { // default error function
if ("undefined" === typeof Error) {
Expand Down Expand Up @@ -6907,7 +6907,7 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,

// attach the sorted list to the citation item
citation.sortedItems = sortedItems;

// build reconstituted citations list in current document order
var citationByIndex = [];
var citationById = {};
Expand Down Expand Up @@ -7235,10 +7235,15 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
if (prevCitation.properties.mode === "author-only" && j > 1) {
old_last_id_offset = 2;
}
oldlastid = citations[j - old_last_id_offset].sortedItems.slice(-1)[0][1].id;
oldlastxloc = citations[j - old_last_id_offset].sortedItems.slice(-1)[0][1]["locator-extra"];
if (prevCitation.sortedItems[0].slice(-1)[0].legislation_id) {
oldlastid = prevCitation.sortedItems[0].slice(-1)[0].legislation_id;
var adjusted_offset = (j - old_last_id_offset);
if (citations[adjusted_offset].sortedItems.length) {
oldlastid = citations[adjusted_offset].sortedItems.slice(-1)[0][1].id;
oldlastxloc = citations[j - old_last_id_offset].sortedItems.slice(-1)[0][1]["locator-extra"];
}
if (prevCitation.sortedItems.length) {
if (prevCitation.sortedItems[0].slice(-1)[0].legislation_id) {
oldlastid = prevCitation.sortedItems[0].slice(-1)[0].legislation_id;
}
}
}
if (j > 0 && k === 0 && prevCitation.properties.noteIndex !== thisCitation.properties.noteIndex) {
Expand Down
17 changes: 11 additions & 6 deletions citeproc_commonjs.js
Expand Up @@ -59,7 +59,7 @@ Copyright (c) 2009-2019 Frank Bennett

var CSL = {

PROCESSOR_VERSION: "1.2.29",
PROCESSOR_VERSION: "1.2.30",

error: function(str) { // default error function
if ("undefined" === typeof Error) {
Expand Down Expand Up @@ -6907,7 +6907,7 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,

// attach the sorted list to the citation item
citation.sortedItems = sortedItems;

// build reconstituted citations list in current document order
var citationByIndex = [];
var citationById = {};
Expand Down Expand Up @@ -7235,10 +7235,15 @@ CSL.Engine.prototype.processCitationCluster = function (citation, citationsPre,
if (prevCitation.properties.mode === "author-only" && j > 1) {
old_last_id_offset = 2;
}
oldlastid = citations[j - old_last_id_offset].sortedItems.slice(-1)[0][1].id;
oldlastxloc = citations[j - old_last_id_offset].sortedItems.slice(-1)[0][1]["locator-extra"];
if (prevCitation.sortedItems[0].slice(-1)[0].legislation_id) {
oldlastid = prevCitation.sortedItems[0].slice(-1)[0].legislation_id;
var adjusted_offset = (j - old_last_id_offset);
if (citations[adjusted_offset].sortedItems.length) {
oldlastid = citations[adjusted_offset].sortedItems.slice(-1)[0][1].id;
oldlastxloc = citations[j - old_last_id_offset].sortedItems.slice(-1)[0][1]["locator-extra"];
}
if (prevCitation.sortedItems.length) {
if (prevCitation.sortedItems[0].slice(-1)[0].legislation_id) {
oldlastid = prevCitation.sortedItems[0].slice(-1)[0].legislation_id;
}
}
}
if (j > 0 && k === 0 && prevCitation.properties.noteIndex !== thisCitation.properties.noteIndex) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "citeproc",
"version": "2.2.29",
"description": "The citeproc-js citation formatting module, in CommonJS format. This version is based on citeproc-js 1.2.29",
"version": "2.2.30",
"description": "The citeproc-js citation formatting module, in CommonJS format. This version is based on citeproc-js 1.2.30",
"main": "citeproc_commonjs.js",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/load.js
Expand Up @@ -35,7 +35,7 @@

var CSL = {

PROCESSOR_VERSION: "1.2.29",
PROCESSOR_VERSION: "1.2.30",

error: function(str) { // default error function
if ("undefined" === typeof Error) {
Expand Down

0 comments on commit 1aa49dd

Please sign in to comment.