mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Add missing string cast for marginal
This commit is contained in:
parent
6ff5536127
commit
18511686f3
@ -173,6 +173,7 @@ impl Cast<Spanned<Value>> for Marginal {
|
||||
fn cast(value: Spanned<Value>) -> StrResult<Self> {
|
||||
match value.v {
|
||||
Value::None => Ok(Self::None),
|
||||
Value::Str(v) => Ok(Self::Content(Content::Text(v))),
|
||||
Value::Content(v) => Ok(Self::Content(v)),
|
||||
Value::Func(v) => Ok(Self::Func(v, value.span)),
|
||||
_ => Err("expected none, content or function")?,
|
||||
|
Loading…
x
Reference in New Issue
Block a user