diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-01-05 11:18:13 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-01-05 11:18:13 +0100 |
| commit | bd384a2a633e21cd7deff7ed2a29a9c03a63a20e (patch) | |
| tree | 12246c7c9142efe5fc2b2feb14fe4f286e3e177f /src/library/align.rs | |
| parent | 7b84f3b553de672e5374e142467f63b10009aeca (diff) | |
Re-enable *, _ and `.
Diffstat (limited to 'src/library/align.rs')
| -rw-r--r-- | src/library/align.rs | 7 |
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)], } } } |
