summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/src/math/mod.rs3
-rw-r--r--tests/ref/bugs/math-hide.pngbin0 -> 1719 bytes
-rw-r--r--tests/typ/bugs/math-hide.typ16
3 files changed, 19 insertions, 0 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index db066522..626f3d87 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -256,6 +256,9 @@ impl Layout for EquationElem {
frame.size_mut().y = ascent + descent;
}
+ // Apply metadata.
+ frame.meta(styles, false);
+
Ok(Fragment::frame(frame))
}
}
diff --git a/tests/ref/bugs/math-hide.png b/tests/ref/bugs/math-hide.png
new file mode 100644
index 00000000..7ac5d2f1
--- /dev/null
+++ b/tests/ref/bugs/math-hide.png
Binary files differ
diff --git a/tests/typ/bugs/math-hide.typ b/tests/typ/bugs/math-hide.typ
new file mode 100644
index 00000000..8e268c97
--- /dev/null
+++ b/tests/typ/bugs/math-hide.typ
@@ -0,0 +1,16 @@
+// Ensure that the math is properly hidden.
+
+---
+#set page(height: 70pt)
+
+Testing $delta$
+
+$ a^2 + b^2 = c^2 $
+
+#hide[
+ Hello
+
+ $ f(x) := x^2 $
+
+ World $f(x)$
+]