mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Fix hiding of math (#587)
This commit is contained in:
parent
b3faef4b80
commit
f548223663
@ -256,6 +256,9 @@ impl Layout for EquationElem {
|
|||||||
frame.size_mut().y = ascent + descent;
|
frame.size_mut().y = ascent + descent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Apply metadata.
|
||||||
|
frame.meta(styles, false);
|
||||||
|
|
||||||
Ok(Fragment::frame(frame))
|
Ok(Fragment::frame(frame))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
tests/ref/bugs/math-hide.png
Normal file
BIN
tests/ref/bugs/math-hide.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
16
tests/typ/bugs/math-hide.typ
Normal file
16
tests/typ/bugs/math-hide.typ
Normal file
@ -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)$
|
||||||
|
]
|
Loading…
x
Reference in New Issue
Block a user