Fix parsing of unbalanced delimiters in math
This commit is contained in:
parent
477275c030
commit
c5fb34123c
@ -361,6 +361,8 @@ fn math_delimited(p: &mut Parser, stop: MathClass) {
|
||||
p.unexpected();
|
||||
}
|
||||
}
|
||||
|
||||
p.wrap(m, SyntaxKind::Math);
|
||||
}
|
||||
|
||||
fn math_unparen(p: &mut Parser, m: Marker) {
|
||||
|
BIN
tests/ref/math/unbalanced.png
Normal file
BIN
tests/ref/math/unbalanced.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
6
tests/typ/math/unbalanced.typ
Normal file
6
tests/typ/math/unbalanced.typ
Normal file
@ -0,0 +1,6 @@
|
||||
// Test unbalanced delimiters.
|
||||
|
||||
---
|
||||
$ 1/(2 (x) $
|
||||
$ 1_(2 y (x) () $
|
||||
$ 1/(2 y (x) (2(3)) $
|
Loading…
x
Reference in New Issue
Block a user