diff options
Diffstat (limited to 'src/library')
| -rw-r--r-- | src/library/pad.rs | 2 | ||||
| -rw-r--r-- | src/library/sized.rs | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/library/pad.rs b/src/library/pad.rs index 4bd7fd64..05cc30b7 100644 --- a/src/library/pad.rs +++ b/src/library/pad.rs @@ -15,7 +15,7 @@ pub fn pad(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { bottom.or(all).unwrap_or_default(), ); - Ok(Value::Template(Template::from_inline(move |style| { + Ok(Value::Template(Template::from_block(move |style| { body.pack(style).padded(padding) }))) } diff --git a/src/library/sized.rs b/src/library/sized.rs index daf2b407..dfdc721d 100644 --- a/src/library/sized.rs +++ b/src/library/sized.rs @@ -10,13 +10,11 @@ pub fn box_(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { }))) } -/// `block`: Size content and place it into the flow. +/// `block`: Place content into the flow. pub fn block(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> { - let width = args.named("width")?; - let height = args.named("height")?; let body: Template = args.find().unwrap_or_default(); Ok(Value::Template(Template::from_block(move |style| { - body.pack(style).sized(Spec::new(width, height)) + body.pack(style) }))) } |
