From 31af413b9874b19fccf0ef2587848ab76c1bee6f Mon Sep 17 00:00:00 2001 From: Andrew Voynov Date: Tue, 20 May 2025 14:51:41 +0300 Subject: [PATCH] Specify which CSL style is not suitable for bibliographies --- crates/typst-library/src/model/bibliography.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/typst-library/src/model/bibliography.rs b/crates/typst-library/src/model/bibliography.rs index 51e3b03b0..d64d12412 100644 --- a/crates/typst-library/src/model/bibliography.rs +++ b/crates/typst-library/src/model/bibliography.rs @@ -224,7 +224,12 @@ impl Show for Packed { let references = works .references .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)?; if references.iter().any(|(prefix, _)| prefix.is_some()) {