Only mention name if we have it?

This commit is contained in:
Andrew Voynov 2025-06-04 17:50:31 +03:00
parent 31af413b98
commit 31f25ed0fe
No known key found for this signature in database
GPG Key ID: 1BE92DD685700329

View File

@ -224,11 +224,14 @@ impl Show for Packed<BibliographyElem> {
let references = works let references = works
.references .references
.as_ref() .as_ref()
.ok_or_else(|| { .ok_or_else(|| match self.style(styles).source {
eco_format!( CslSource::Named(style) => eco_format!(
"{:?} CSL style is not suitable for bibliographies", "CSL style `{}` is not suitable for bibliographies",
self.style(styles).into_value() style.display_name()
) ),
CslSource::Normal(..) => {
eco_format!("CSL style is not suitable for bibliographies")
}
}) })
.at(span)?; .at(span)?;