Skip to content

Commit

Permalink
Change to preloadAbbreviations function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Feb 10, 2017
1 parent ea683d6 commit 72bfdbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions chrome/content/zotero/fileInterface.js
Expand Up @@ -430,7 +430,7 @@ var Zotero_File_Interface = new function() {
};

if (Zotero.CiteProc.CSL.preloadAbbreviations) {
yield Zotero.CiteProc.CSL.preloadAbbreviations(cslEngine.opt.styleID, cslEngine.transform.abbrevs, citation);
yield Zotero.CiteProc.CSL.preloadAbbreviations(cslEngine, citation);
}

if (asCitations) {
Expand Down Expand Up @@ -459,7 +459,7 @@ var Zotero_File_Interface = new function() {
cslEngine = style.getCiteProc(locale, null, true);
// Load external abbreviations to the new processor instance
if (Zotero.CiteProc.CSL.preloadAbbreviations) {
yield Zotero.CiteProc.CSL.preloadAbbreviations(cslEngine.opt.styleID, cslEngine.transform.abbrevs, citation);
yield Zotero.CiteProc.CSL.preloadAbbreviations(cslEngine, citation);
}
output = Zotero.Cite.makeFormattedBibliographyOrCitationList(cslEngine, items, "text");
}
Expand Down Expand Up @@ -520,7 +520,7 @@ var Zotero_File_Interface = new function() {
citationItems: items.map(item => ({ id: item.id })),
properties: {}
};
yield Zotero.CiteProc.CSL.preloadAbbreviations(cslEngine.opt.styleID, cslEngine.transform.abbrevs, citation);
yield Zotero.CiteProc.CSL.preloadAbbreviations(cslEngine, citation);
}
var bibliography = Zotero.Cite.makeFormattedBibliographyOrCitationList(cslEngine,
items, format, io.mode === "citations");
Expand Down
2 changes: 1 addition & 1 deletion chrome/content/zotero/tools/csledit.js
Expand Up @@ -197,7 +197,7 @@ var Zotero_CSL_Editor = new function() {
var citations = '<h3>' + Zotero.getString('styles.editor.output.individualCitations') + '</h3>';

if (Zotero.CiteProc.CSL.preloadAbbreviations) {
yield Zotero.CiteProc.CSL.preloadAbbreviations(styleEngine.opt.styleID, styleEngine.transform.abbrevs, citation);
yield Zotero.CiteProc.CSL.preloadAbbreviations(styleEngine, citation);
}

for (var i=0; i<citation.citationItems.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions chrome/content/zotero/xpcom/integration.js
Expand Up @@ -2000,7 +2000,7 @@ Zotero.Integration.CitationEditInterface.prototype = {
var me = this;
return this._updateSession().then(function* () {
if (Zotero.CiteProc.CSL.preloadAbbreviations) {
yield Zotero.CiteProc.CSL.preloadAbbreviations(this.style.opt.styleID, this.style.transform.abbrevs, me.citation);
yield Zotero.CiteProc.CSL.preloadAbbreviations(this.style, me.citation);
}
me.citation.properties.zoteroIndex = me._fieldIndex;
me.citation.properties.noteIndex = me._field.getNoteIndex();
Expand Down Expand Up @@ -2765,7 +2765,7 @@ Zotero.Integration.Session.prototype.formatCitation = Zotero.Promise.coroutine(f
Zotero.debug("Integration: style.processCitationCluster("+citation.toSource()+", "+citationsPre.toSource()+", "+citationsPost.toSource());
}
if (Zotero.CiteProc.CSL.preloadAbbreviations) {
yield Zotero.CiteProc.CSL.preloadAbbreviations(this.style.opt.styleID, this.style.transform.abbrevs, citation);
yield Zotero.CiteProc.CSL.preloadAbbreviations(this.style, citation);
}
var newCitations = this.style.processCitationCluster(citation, citationsPre, citationsPost);
for (let newCitation of newCitations[1]) {
Expand Down

0 comments on commit 72bfdbe

Please sign in to comment.