From e4e79990dad90aea17ea99e54fcd60435927bb56 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 29 Aug 2021 15:09:54 +0200 Subject: Allow body for font function once again --- src/library/layout.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/library/layout.rs') diff --git a/src/library/layout.rs b/src/library/layout.rs index 3e8aa7d2..a62be646 100644 --- a/src/library/layout.rs +++ b/src/library/layout.rs @@ -126,17 +126,17 @@ pub fn align(ctx: &mut EvalContext, args: &mut Arguments) -> TypResult { } }; - if let Some(body) = body { + Ok(if let Some(body) = body { let mut template = Template::new(); template.save(); realign(&mut template); template += body; template.restore(); - Ok(Value::Template(template)) + Value::Template(template) } else { realign(&mut ctx.template); - Ok(Value::None) - } + Value::None + }) } /// `box`: Place content in a rectangular box. -- cgit v1.2.3