Skip to content

Commit

Permalink
more descriptive function name
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Oct 1, 2024
1 parent 00d5cd0 commit 19b3e5b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/csl/taxonomy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ impl EntryLike for Entry {
}

#[cfg(feature = "csl-json")]
fn resolve_csl_json_variable(
fn resolve_csl_json_standard_variable(
item: &citationberg::json::Item,
variable: StandardVariable,
) -> Option<Cow<'_, ChunkedString>> {
Expand Down Expand Up @@ -708,15 +708,19 @@ impl EntryLike for citationberg::json::Item {
// Per citeproc tests, a 'title-short' without 'title' is
// valid and should be used when the short form is
// selected.
resolve_csl_json_variable(self, StandardVariable::TitleShort).or_else(
|| resolve_csl_json_variable(self, StandardVariable::Title),
)
resolve_csl_json_standard_variable(self, StandardVariable::TitleShort)
.or_else(|| {
resolve_csl_json_standard_variable(
self,
StandardVariable::Title,
)
})
}
LongShortForm::Long => {
resolve_csl_json_variable(self, StandardVariable::Title)
resolve_csl_json_standard_variable(self, StandardVariable::Title)
}
},
_ => resolve_csl_json_variable(self, variable),
_ => resolve_csl_json_standard_variable(self, variable),
}
}

Expand Down

0 comments on commit 19b3e5b

Please sign in to comment.