From c5a4871a6a26ad0b36b99dc640df4c89f5ac0054 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 12 Apr 2020 16:27:19 -0400 Subject: [PATCH] Set freshwater-science to capitalize the first word of subtitles https://forums.zotero.org/discussion/comment/352212/#Comment_352212 --- chrome/content/zotero/xpcom/style.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js index 53796bcfb9..b0da8ecf03 100644 --- a/chrome/content/zotero/xpcom/style.js +++ b/chrome/content/zotero/xpcom/style.js @@ -648,10 +648,13 @@ Zotero.Style = function (style, path) { Zotero.Styles.ns).replace(/(.+)T([^\+]+)\+?.*/, "$1 $2"); this.locale = Zotero.Utilities.xpathText(doc, '/csl:style/@default-locale', Zotero.Styles.ns) || null; + + // APA and some similar styles capitalize the first word of subtitles this._uppercaseSubtitles = false; - var uppercaseSubtitlesRE = /^apa($|-)|^(academy-of-management)/; + var uppercaseSubtitlesRE = /^apa($|-)|^(academy-of-management|freshwater-science)/; var shortIDMatches = this.styleID.match(/\/?([^/]+)$/); this._uppercaseSubtitles = !!shortIDMatches && uppercaseSubtitlesRE.test(shortIDMatches[1]); + this._class = doc.documentElement.getAttribute("class"); this._usesAbbreviation = !!Zotero.Utilities.xpath(doc, '//csl:text[(@variable="container-title" and @form="short") or (@variable="container-title-short")][1]',