Set freshwater-science to capitalize the first word of subtitles
https://forums.zotero.org/discussion/comment/352212/#Comment_352212
This commit is contained in:
parent
36afe4573f
commit
c5a4871a6a
1 changed files with 4 additions and 1 deletions
|
@ -648,10 +648,13 @@ Zotero.Style = function (style, path) {
|
||||||
Zotero.Styles.ns).replace(/(.+)T([^\+]+)\+?.*/, "$1 $2");
|
Zotero.Styles.ns).replace(/(.+)T([^\+]+)\+?.*/, "$1 $2");
|
||||||
this.locale = Zotero.Utilities.xpathText(doc, '/csl:style/@default-locale',
|
this.locale = Zotero.Utilities.xpathText(doc, '/csl:style/@default-locale',
|
||||||
Zotero.Styles.ns) || null;
|
Zotero.Styles.ns) || null;
|
||||||
|
|
||||||
|
// APA and some similar styles capitalize the first word of subtitles
|
||||||
this._uppercaseSubtitles = false;
|
this._uppercaseSubtitles = false;
|
||||||
var uppercaseSubtitlesRE = /^apa($|-)|^(academy-of-management)/;
|
var uppercaseSubtitlesRE = /^apa($|-)|^(academy-of-management|freshwater-science)/;
|
||||||
var shortIDMatches = this.styleID.match(/\/?([^/]+)$/);
|
var shortIDMatches = this.styleID.match(/\/?([^/]+)$/);
|
||||||
this._uppercaseSubtitles = !!shortIDMatches && uppercaseSubtitlesRE.test(shortIDMatches[1]);
|
this._uppercaseSubtitles = !!shortIDMatches && uppercaseSubtitlesRE.test(shortIDMatches[1]);
|
||||||
|
|
||||||
this._class = doc.documentElement.getAttribute("class");
|
this._class = doc.documentElement.getAttribute("class");
|
||||||
this._usesAbbreviation = !!Zotero.Utilities.xpath(doc,
|
this._usesAbbreviation = !!Zotero.Utilities.xpath(doc,
|
||||||
'//csl:text[(@variable="container-title" and @form="short") or (@variable="container-title-short")][1]',
|
'//csl:text[(@variable="container-title" and @form="short") or (@variable="container-title-short")][1]',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue