diff --git a/crates/typst-library/src/math/accent.rs b/crates/typst-library/src/math/accent.rs index aebd33475..6c1a34cf6 100644 --- a/crates/typst-library/src/math/accent.rs +++ b/crates/typst-library/src/math/accent.rs @@ -189,6 +189,6 @@ cast! { v: char => Self::new(v), v: Content => match v.to_packed::() { Some(elem) if elem.text.chars().count() == 1 => Self::new(elem.text.chars().next().unwrap()), - _ => bail!("expected a single-character symbol"), + _ => bail!("expected a single-codepoint symbol"), }, } diff --git a/crates/typst-library/src/math/matrix.rs b/crates/typst-library/src/math/matrix.rs index 708160158..d96312094 100644 --- a/crates/typst-library/src/math/matrix.rs +++ b/crates/typst-library/src/math/matrix.rs @@ -274,7 +274,7 @@ cast! { Delimiter, self => self.0.into_value(), _: NoneValue => Self::none(), - v: Symbol => Self::char(v.get().parse::().map_err(|_| "symbol value is longer than one character")?)?, + v: Symbol => Self::char(v.get().parse::().map_err(|_| "expected a single-codepoint symbol")?)?, v: char => Self::char(v)?, }