www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 39e7ca7c9e7d4b86843e544868023ef5a9968820
parent 6fa3511f3311bb45a5c295977167033c98994647
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 26 Apr 2014 01:59:09 -0400

Merge pull request #473 from adam3smith/sentence-correct

some fixes to sentence case conversion.
Diffstat:
Mchrome/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 @@ -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: