diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-24 14:09:38 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-24 14:09:38 +0100 |
| commit | 448844d66cef5f4980d0575e783757264c962bb5 (patch) | |
| tree | f280aaef927da2a30c18f13cc124c8eb77ad3abf /library/src/text | |
| parent | 6547c2d6d5b25f44e52ac56698ed08ff6a5dbb3a (diff) | |
Allow multiple authors
Diffstat (limited to 'library/src/text')
| -rw-r--r-- | library/src/text/misc.rs | 2 | ||||
| -rw-r--r-- | library/src/text/mod.rs | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/library/src/text/misc.rs b/library/src/text/misc.rs index 43aea021..68d46d80 100644 --- a/library/src/text/misc.rs +++ b/library/src/text/misc.rs @@ -374,5 +374,5 @@ pub fn smallcaps(args: &mut Args) -> SourceResult<Value> { #[func] pub fn lorem(args: &mut Args) -> SourceResult<Value> { let words: usize = args.expect("number of words")?; - Ok(Value::Str(lipsum::lipsum(words).into())) + Ok(Value::Str(lipsum::lipsum(words).replace("--", "–").into())) } diff --git a/library/src/text/mod.rs b/library/src/text/mod.rs index 1ef32fa4..2c7cac04 100644 --- a/library/src/text/mod.rs +++ b/library/src/text/mod.rs @@ -548,10 +548,7 @@ pub struct FallbackList(pub Vec<FontFamily>); castable! { FallbackList, family: FontFamily => Self(vec![family]), - values: Array => Self(values - .into_iter() - .filter_map(|v| v.cast().ok()) - .collect()), + values: Array => Self(values.into_iter().map(|v| v.cast()).collect::<StrResult<_>>()?), } /// The size of text. |
