summaryrefslogtreecommitdiff
path: root/src/library/math/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/math/mod.rs')
-rw-r--r--src/library/math/mod.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/library/math/mod.rs b/src/library/math/mod.rs
index b23ed7cf..63d5f419 100644
--- a/src/library/math/mod.rs
+++ b/src/library/math/mod.rs
@@ -103,16 +103,13 @@ impl Show for MathNode {
&self,
_: Tracked<dyn World>,
styles: StyleChain,
- mut realized: Content,
+ realized: Content,
) -> SourceResult<Content> {
- let mut map = StyleMap::new();
- map.set_family(styles.get(Self::FAMILY).clone(), styles);
-
- if self.display() {
- realized = realized.spaced(styles.get(Self::ABOVE), styles.get(Self::BELOW));
- }
-
- Ok(realized.styled_with_map(map))
+ Ok(if self.display() {
+ realized.spaced(styles.get(Self::ABOVE), styles.get(Self::BELOW))
+ } else {
+ realized
+ })
}
}