summaryrefslogtreecommitdiff
path: root/library/src/math/mod.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-02 16:47:10 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-02 16:47:10 +0100
commite9ff2d6463bf26cb0bbafb747bf8a77800687e3f (patch)
tree810d28ba35557acacf987d08c2000e2e643cbe4e /library/src/math/mod.rs
parente6400861ab5c4d7ab437901b2334e5822c2693a5 (diff)
More robust automatic math spacing
Diffstat (limited to 'library/src/math/mod.rs')
-rw-r--r--library/src/math/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index 4e60faca..656fc2e0 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -261,7 +261,7 @@ impl LayoutMath for Content {
}
if self.is::<SpaceNode>() {
- ctx.push(MathFragment::Space);
+ ctx.push(MathFragment::Space(ctx.space_width.scaled(ctx)));
return Ok(());
}
@@ -288,8 +288,8 @@ impl LayoutMath for Content {
return node.layout_math(ctx);
}
- let frame = ctx.layout_non_math(self)?;
- ctx.push(FrameFragment::new(frame).with_spaced(true));
+ let frame = ctx.layout_content(self)?;
+ ctx.push(FrameFragment::new(ctx, frame).with_spaced(true));
Ok(())
}