From 96bd07b17240bd0665465793a5a729a7845f1e23 Mon Sep 17 00:00:00 2001 From: adam3smith Date: Mon, 21 Apr 2014 16:50:05 -0600 Subject: [PATCH] some fixes to sentence case conversion. See https://forums.zotero.org/discussion/35190/beta-capitalization-after-colons/#Item_14 --- chrome/content/zotero/bindings/itembox.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 3c97c40e02..e5dd2980fc 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -1950,10 +1950,10 @@ break; case 'sentence': // capitalize the first letter, including after beginning punctuation - // capitalize after :, ?, ! and remove space(s) before those analogous to capitalizeTitle function - // also deal with initial punctuation here - open quotes and Spanish beginning quotation marks - newVal = val.toLowerCase(); - newVal = newVal.replace(/(([:\?!]\s*|^)([\'\"¡¿“‘„«\s]+)?[^\s])/g, function (x) { + // capitalize after ?, ! and remove space(s) before those as well as colon analogous to capitalizeTitle function + // also deal with initial punctuation here - open quotes and Spanish beginning punctuation marks + newVal = val.toLowerCase().replace(/\s*:/, ":"); + newVal = newVal.replace(/(([\?!]\s*|^)([\'\"¡¿“‘„«\s]+)?[^\s])/g, function (x) { return x.replace(/\s+/m, " ").toUpperCase();}); break; default: