Don't change capitalization of unabbeviated words in journal titles

Fixes https://forums.zotero.org/discussion/30352/
This commit is contained in:
Simon Kornblith 2013-06-18 23:51:46 -04:00
parent 9f0e5c02a6
commit 6f9ffe13e3

View File

@ -364,8 +364,8 @@ Zotero.Cite.getAbbreviation = new function() {
*/
function normalizeKey(key) {
// Strip periods, normalize spacing, and convert to lowercase
return key.toString().toLowerCase().
replace(/(?:\b|^)(?:and|et|y|und|l[ae]|the|[ld]')(?:\b|$)|[\x21-\x2C.\/\x3A-\x40\x5B-\x60\\\x7B-\x7E]/g, "").
return key.toString().
replace(/(?:\b|^)(?:and|et|y|und|l[ae]|the|[ld]')(?:\b|$)|[\x21-\x2C.\/\x3A-\x40\x5B-\x60\\\x7B-\x7E]/ig, "").
replace(/\s+/g, " ").trim();
}