Specify which CSL style is not suitable for bibliographies

This commit is contained in:
Andrew Voynov 2025-05-20 14:51:41 +03:00
parent d204a28818
commit 31af413b98
No known key found for this signature in database
GPG Key ID: 1BE92DD685700329

View File

@ -224,7 +224,12 @@ impl Show for Packed<BibliographyElem> {
let references = works let references = works
.references .references
.as_ref() .as_ref()
.ok_or("CSL style is not suitable for bibliographies") .ok_or_else(|| {
eco_format!(
"{:?} CSL style is not suitable for bibliographies",
self.style(styles).into_value()
)
})
.at(span)?; .at(span)?;
if references.iter().any(|(prefix, _)| prefix.is_some()) { if references.iter().any(|(prefix, _)| prefix.is_some()) {