diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js
index 3e0a4964a..e49df0395 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.165",
+ PROCESSOR_VERSION: "1.1.167",
CONDITION_LEVEL_TOP: 1,
CONDITION_LEVEL_BOTTOM: 2,
PLAIN_HYPHEN_REGEX: /(?:[^\\]-|\u2013)/,
@@ -3796,6 +3796,10 @@ CSL.Output.Queue.prototype.append = function (str, tokname, notSerious, ignorePr
this.state.parallel.AppendBlobPointer(curr);
}
if ("string" === typeof str) {
+ if ("string" === typeof blob.blobs && [':', '!', '?', '.', ',', ';'].indexOf(blob.blobs.slice(0, 1)) > -1) {
+ blob.strings.prefix = blob.strings.prefix + blob.blobs.slice(0, 1);
+ blob.blobs = blob.blobs.slice(1);
+ }
if (blob.strings["text-case"]) {
blob.blobs = CSL.Output.Formatters[blob.strings["text-case"]](this.state, str);
}
@@ -14689,7 +14693,7 @@ CSL.Util.FlipFlopper = function(state) {
}
return false;
}
- function _undoppelToQueue(blob, doppel) {
+ function _undoppelToQueue(blob, doppel, leadingSpace) {
var TOP = blob;
var firstString = true;
var tagReg = new _TagReg(blob);
@@ -14767,7 +14771,11 @@ CSL.Util.FlipFlopper = function(state) {
};
var stack = new Stack(blob);
if (doppel.strings.length) {
- stack.addStyling(doppel.strings[0]);
+ var str = doppel.strings[0];
+ if (leadingSpace) {
+ str = " " + str;
+ }
+ stack.addStyling(str);
}
for (var i=0,ilen=doppel.tags.length;i