diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-10 20:01:18 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-10 23:10:17 +0200 |
| commit | 6a4823461f491aef63451f097ddfe5602e0b2157 (patch) | |
| tree | ad11b0ad169d030942d950573c729d50f7b3291b /src/library/text.rs | |
| parent | 36b3067c19c8743032a44f888ee48702b88d135b (diff) | |
Reference-count complex values
Rename some nodes types
Diffstat (limited to 'src/library/text.rs')
| -rw-r--r-- | src/library/text.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/text.rs b/src/library/text.rs index a0ffc56c..e6de04a1 100644 --- a/src/library/text.rs +++ b/src/library/text.rs @@ -23,7 +23,7 @@ pub fn font(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value { let serif = args.named(ctx, "serif"); let sans_serif = args.named(ctx, "sans-serif"); let monospace = args.named(ctx, "monospace"); - let body = args.expect::<TemplateValue>(ctx, "body").unwrap_or_default(); + let body = args.expect::<Template>(ctx, "body").unwrap_or_default(); Value::template(move |ctx| { let font = ctx.state.font_mut(); @@ -163,7 +163,7 @@ pub fn par(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value { let spacing = args.named(ctx, "spacing"); let leading = args.named(ctx, "leading"); let word_spacing = args.named(ctx, "word-spacing"); - let body = args.expect::<TemplateValue>(ctx, "body").unwrap_or_default(); + let body = args.expect::<Template>(ctx, "body").unwrap_or_default(); Value::template(move |ctx| { if let Some(spacing) = spacing { @@ -194,7 +194,7 @@ pub fn lang(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value { } None => None, }; - let body = args.expect::<TemplateValue>(ctx, "body").unwrap_or_default(); + let body = args.expect::<Template>(ctx, "body").unwrap_or_default(); Value::template(move |ctx| { if let Some(dir) = dir.or(iso) { @@ -239,7 +239,7 @@ fn line_impl( let thickness = args.eat(ctx).or_else(|| args.named::<Linear>(ctx, "thickness")); let offset = args.named(ctx, "offset"); let extent = args.named(ctx, "extent").unwrap_or_default(); - let body = args.expect::<TemplateValue>(ctx, "body").unwrap_or_default(); + let body = args.expect::<Template>(ctx, "body").unwrap_or_default(); // Suppress any existing strikethrough if strength is explicitly zero. let state = thickness.map_or(true, |s| !s.is_zero()).then(|| { |
