Set freshwater-science to capitalize the first word of subtitles

https://forums.zotero.org/discussion/comment/352212/#Comment_352212
This commit is contained in:
Dan Stillman 2020-04-12 16:27:19 -04:00
parent 36afe4573f
commit c5a4871a6a

View file

@ -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]',