summaryrefslogtreecommitdiff
path: root/src/library/align.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-03-12 14:16:59 +0100
committerLaurenz <laurmaedje@gmail.com>2021-03-12 14:16:59 +0100
commitc3acb491e38d333acff6897479f7dd9c86fba307 (patch)
tree7bf33511e7631c2ebff1b1f438eeefba6e3ae6a2 /src/library/align.rs
parent584a43277dbfbdba834a2681afe63d10598db3f9 (diff)
Refactor execution context 🏗
- The execution context is a lot more structured: Instead of a magic stack of arbitrary objects there are static objects for pages, stacks and paragraphs - Page softness/keeping mechanic is now a lot simpler than before
Diffstat (limited to 'src/library/align.rs')
-rw-r--r--src/library/align.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/library/align.rs b/src/library/align.rs
index 07566f2d..98feb3ef 100644
--- a/src/library/align.rs
+++ b/src/library/align.rs
@@ -89,15 +89,14 @@ pub fn align(ctx: &mut EvalContext, args: &mut ValueArgs) -> Value {
}
}
- // If `had_center` wasn't flushed by now, it's the only argument and then we
- // default to applying it to the cross axis.
+ // If `had_center` wasn't flushed by now, it's the only argument and
+ // then we default to applying it to the cross axis.
if had_center {
ctx.state.aligns.cross = Align::Center;
}
if ctx.state.aligns.main != snapshot.aligns.main {
- ctx.end_par_group();
- ctx.start_par_group();
+ ctx.push_linebreak();
}
if let Some(body) = &body {