summaryrefslogtreecommitdiff
path: root/library/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'library/src/math')
-rw-r--r--library/src/math/mod.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index 7772c0af..fb53b52d 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -28,15 +28,16 @@ impl MathNode {
}
impl Show for MathNode {
- fn unguard_parts(&self, _: RecipeId) -> Content {
- self.clone().pack()
- }
-
fn show(&self, _: Tracked<dyn World>, styles: StyleChain) -> SourceResult<Content> {
let mut map = StyleMap::new();
map.set_family(FontFamily::new("NewComputerModernMath"), styles);
- let mut realized = self.clone().pack().styled_with_map(map);
+ let mut realized = self
+ .clone()
+ .pack()
+ .guard(RecipeId::Base(NodeId::of::<Self>()))
+ .styled_with_map(map);
+
if self.display {
realized = realized.aligned(Axes::with_x(Some(Align::Center.into())))
}