Skip to content

Commit

Permalink
Do not print secondary or tertiary abbrevs that match primary
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Jul 21, 2019
1 parent a7973df commit 8ee6bec
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/util_transform.js
Expand Up @@ -559,7 +559,10 @@ CSL.Transform = function (state) {
primary_tok.strings.suffix = primary_tok.strings.suffix.replace(/[ .,]+$/,"");
state.output.append(primary, primary_tok);
state.tmp.probably_rendered_something = true;


if (primary === secondary) {
secondary = false;
}
if (secondary) {
secondary_tok.strings.prefix = state.opt.citeAffixes[langPrefs][slot.secondary].prefix;
secondary_tok.strings.suffix = state.opt.citeAffixes[langPrefs][slot.secondary].suffix;
Expand Down Expand Up @@ -588,6 +591,10 @@ CSL.Transform = function (state) {
// Suppress supplementary multilingual info on subsequent
// partners of a parallel cite?
}
if (primary === tertiary) {
tertiary = false;
}

if (tertiary) {
tertiary_tok.strings.prefix = state.opt.citeAffixes[langPrefs][slot.tertiary].prefix;
tertiary_tok.strings.suffix = state.opt.citeAffixes[langPrefs][slot.tertiary].suffix;
Expand Down

0 comments on commit 8ee6bec

Please sign in to comment.