mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
parent
2bbd8040c8
commit
2c7f2c005a
@ -430,6 +430,10 @@ impl Lexer<'_> {
|
||||
// Keep numbers and grapheme clusters together.
|
||||
if c.is_numeric() {
|
||||
self.s.eat_while(char::is_numeric);
|
||||
let mut s = self.s;
|
||||
if s.eat_if('.') && !s.eat_while(char::is_numeric).is_empty() {
|
||||
self.s = s;
|
||||
}
|
||||
} else {
|
||||
let len = self
|
||||
.s
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
@ -27,6 +27,7 @@ $ 1/2/3 = (1/2)/3 = 1/(2/3) $
|
||||
---
|
||||
// Test precedence.
|
||||
$ a_1/b_2, 1/f(x), zeta(x)/2, "foo"[|x|]/2 \
|
||||
1.2/3.7, 2.3^3.4 \
|
||||
🏳️🌈[x]/2, f [x]/2, phi [x]/2, 🏳️🌈 [x]/2 \
|
||||
+[x]/2, 1(x)/2, 2[x]/2 \
|
||||
(a)b/2, b(a)[b]/2 $
|
||||
|
Loading…
x
Reference in New Issue
Block a user