summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-09-06 12:15:27 +0200
committerLaurenz <laurmaedje@gmail.com>2023-09-06 12:15:27 +0200
commit65aeea31423ec9ea872c52f41469ad6adbeded17 (patch)
tree8d29c1bbb9b91a82be8d0a7e8d1fd23e95523d43 /crates
parentfe402759c03eb93cefc2879e751b8e732891bd3e (diff)
Fix spacing after number in math
Fixes #1052
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-library/src/math/ctx.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-library/src/math/ctx.rs b/crates/typst-library/src/math/ctx.rs
index 2ebd55b9..b9aef711 100644
--- a/crates/typst-library/src/math/ctx.rs
+++ b/crates/typst-library/src/math/ctx.rs
@@ -190,7 +190,7 @@ impl<'a, 'b, 'v> MathContext<'a, 'b, 'v> {
} else {
glyph.into()
}
- } else if text.chars().all(|c| c.is_ascii_digit()) {
+ } else if text.chars().all(|c| c.is_ascii_digit() || c == '.') {
// Numbers aren't that difficult.
let mut fragments = vec![];
for c in text.chars() {