diff options
| author | Ian Wrzesinski <133046678+wrzian@users.noreply.github.com> | 2025-04-02 05:30:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-02 09:30:04 +0000 |
| commit | 12699eb7f415bdba6797c84e3e7bf44dde75bdf9 (patch) | |
| tree | a0fa17865317b697c469bd0cfee9814f7adada53 /tests | |
| parent | 96dd67e011bb317cf78683bcf1edfdfca5e7b6b3 (diff) | |
Parse multi-character numbers consistently in math (#5996)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/issue-4828-math-number-multi-char.png | bin | 0 -> 465 bytes | |||
| -rw-r--r-- | tests/ref/math-frac-precedence.png | bin | 5504 -> 3586 bytes | |||
| -rw-r--r-- | tests/suite/math/frac.typ | 4 | ||||
| -rw-r--r-- | tests/suite/math/syntax.typ | 4 |
4 files changed, 6 insertions, 2 deletions
diff --git a/tests/ref/issue-4828-math-number-multi-char.png b/tests/ref/issue-4828-math-number-multi-char.png Binary files differnew file mode 100644 index 00000000..ff0a9bab --- /dev/null +++ b/tests/ref/issue-4828-math-number-multi-char.png diff --git a/tests/ref/math-frac-precedence.png b/tests/ref/math-frac-precedence.png Binary files differindex 973c433e..fd16f2e6 100644 --- a/tests/ref/math-frac-precedence.png +++ b/tests/ref/math-frac-precedence.png diff --git a/tests/suite/math/frac.typ b/tests/suite/math/frac.typ index 7f513930..3bd00eab 100644 --- a/tests/suite/math/frac.typ +++ b/tests/suite/math/frac.typ @@ -37,8 +37,8 @@ $ 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 \ + f [x]/2, phi [x]/2 \ + +[x]/2, 1(x)/2, 2[x]/2, 🏳️🌈[x]/2 \ (a)b/2, b(a)[b]/2 \ n!/2, 5!/2, n !/2, 1/n!, 1/5! $ diff --git a/tests/suite/math/syntax.typ b/tests/suite/math/syntax.typ index 7091d908..32b9c098 100644 --- a/tests/suite/math/syntax.typ +++ b/tests/suite/math/syntax.typ @@ -28,6 +28,10 @@ $ dot \ dots \ ast \ tilde \ star $ $floor(phi.alt.)$ $floor(phi.alt. )$ +--- issue-4828-math-number-multi-char --- +// Numbers should parse the same regardless of number of characters. +$1/2(x)$ vs. $1/10(x)$ + --- math-unclosed --- // Error: 1-2 unclosed delimiter $a |
