From 67d6c6003e00259dc9192dd8f6f81fd91745293a Mon Sep 17 00:00:00 2001 From: Frank Bennett Date: Wed, 31 Jul 2019 08:31:03 +0900 Subject: [PATCH] Bump version, update CHANGES, bundle as 1.2.21 --- CHANGES.txt | 9 +++++++++ citeproc.js | 6 +++--- citeproc_commonjs.js | 6 +++--- package.json | 4 ++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a703da7a1..454b53fa6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,14 @@ Summary of changes to citeproc-js since version 1.2 release. +========================= +Changes in version 1.2.21 +========================= + +- Block implicit short title if "main" title is purely numeric: + + + https://forums.zotero.org/discussion/78458/incomplete-reference-title-in-text-citation + ========================= Changes in version 1.2.20 ========================= diff --git a/citeproc.js b/citeproc.js index 620db8172..3af749036 100644 --- a/citeproc.js +++ b/citeproc.js @@ -59,7 +59,7 @@ Copyright (c) 2009-2019 Frank Bennett var CSL = { - PROCESSOR_VERSION: "1.2.20", + PROCESSOR_VERSION: "1.2.21", error: function(str) { // default error function if ("undefined" === typeof Error) { @@ -778,12 +778,12 @@ var CSL = { vals[title.subjoin] = splitTitle[1]; vals[title.sub] = splitTitle[2]; if (this.opt.development_extensions.implicit_short_title) { - if (!Item["title-short"]) { + if (!Item[title.short] && !vals[title.main].match(/^[\-\.[0-9]+$/)) { var punct = vals[title.subjoin].trim(); if (["?", "!"].indexOf(punct) === -1) { punct = ""; } - vals[title["short"]] = vals[title.main] + punct; + vals[title.short] = vals[title.main] + punct; } } } else { diff --git a/citeproc_commonjs.js b/citeproc_commonjs.js index cb3de7ec2..9437555c8 100644 --- a/citeproc_commonjs.js +++ b/citeproc_commonjs.js @@ -59,7 +59,7 @@ Copyright (c) 2009-2019 Frank Bennett var CSL = { - PROCESSOR_VERSION: "1.2.20", + PROCESSOR_VERSION: "1.2.21", error: function(str) { // default error function if ("undefined" === typeof Error) { @@ -778,12 +778,12 @@ var CSL = { vals[title.subjoin] = splitTitle[1]; vals[title.sub] = splitTitle[2]; if (this.opt.development_extensions.implicit_short_title) { - if (!Item["title-short"]) { + if (!Item[title.short] && !vals[title.main].match(/^[\-\.[0-9]+$/)) { var punct = vals[title.subjoin].trim(); if (["?", "!"].indexOf(punct) === -1) { punct = ""; } - vals[title["short"]] = vals[title.main] + punct; + vals[title.short] = vals[title.main] + punct; } } } else { diff --git a/package.json b/package.json index d39ca799c..85f9591c6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "citeproc", - "version": "2.2.20", - "description": "The citeproc-js citation formatting module, in CommonJS format. This version is based on citeproc-js 1.2.20", + "version": "2.2.21", + "description": "The citeproc-js citation formatting module, in CommonJS format. This version is based on citeproc-js 1.2.21", "main": "citeproc_commonjs.js", "repository": { "type": "git",