summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/src/math/ctx.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/src/math/ctx.rs b/library/src/math/ctx.rs
index 562f0ba9..a6487476 100644
--- a/library/src/math/ctx.rs
+++ b/library/src/math/ctx.rs
@@ -155,7 +155,7 @@ impl<'a, 'b, 'v> MathContext<'a, 'b, 'v> {
FrameFragment::new(self, frame).into()
} else {
// Anything else is handled by Typst's standard text layout.
- let spaced = text.graphemes(true).count() > 1;
+ let spaced = text.graphemes(true).nth(1).is_some();
let mut style = self.style;
if self.style.italic == Smart::Auto {
style = style.with_italic(false);