summaryrefslogtreecommitdiff
path: root/src/library/align.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/align.rs')
-rw-r--r--src/library/align.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library/align.rs b/src/library/align.rs
index 524ada61..03d905cd 100644
--- a/src/library/align.rs
+++ b/src/library/align.rs
@@ -1,16 +1,17 @@
use crate::func::prelude::*;
use super::maps::{PosAxisMap, AlignmentKey};
+
function! {
/// `align`: Aligns content along the layouting axes.
#[derive(Debug, PartialEq)]
- pub struct Align {
+ pub struct AlignFunc {
body: Option<SyntaxTree>,
map: PosAxisMap<AlignmentKey>,
}
parse(args, body, ctx) {
- Align {
+ AlignFunc {
body: parse!(optional: body, ctx),
map: PosAxisMap::new(&mut args)?,
}
@@ -28,7 +29,7 @@ function! {
match &self.body {
Some(body) => vec![AddMultiple(layout(&body, ctx)?)],
- None => vec![Command::SetAlignment(ctx.alignment)],
+ None => vec![SetAlignment(ctx.alignment)],
}
}
}