diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-02 21:55:25 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-03 13:55:58 +0200 |
| commit | 23d108c8e099798dc4d35ce9cbcd3e37fb50f3b2 (patch) | |
| tree | aa068b11b9ac0a4795fb6e86bb8283b1d4718e95 /src/eval/value.rs | |
| parent | beca01c826ee51c9ee6d5eadd7e5ef10f7fb9f58 (diff) | |
Font fallback
Diffstat (limited to 'src/eval/value.rs')
| -rw-r--r-- | src/eval/value.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/eval/value.rs b/src/eval/value.rs index a76b377d..300444de 100644 --- a/src/eval/value.rs +++ b/src/eval/value.rs @@ -7,6 +7,7 @@ use std::sync::Arc; use super::{ops, Args, Array, Content, Context, Dict, Func, Layout, StrExt}; use crate::diag::{with_alternative, At, StrResult, TypResult}; use crate::geom::{Angle, Color, Fractional, Length, Linear, Relative, RgbaColor}; +use crate::library::text::RawNode; use crate::syntax::{Span, Spanned}; use crate::util::EcoString; @@ -115,9 +116,10 @@ impl Value { Value::Float(v) => Content::Text(format_eco!("{}", v)), Value::Str(v) => Content::Text(v), Value::Content(v) => v, - // For values which can't be shown "naturally", we print the - // representation in monospace. - v => Content::Text(v.repr()).monospaced(), + + // For values which can't be shown "naturally", we return the raw + // representation. + v => Content::show(RawNode { text: v.repr(), block: false }), } } |
