Fix parsing of unbalanced delimiters in math

This commit is contained in:
Laurenz 2023-03-27 16:09:26 +02:00
parent 477275c030
commit c5fb34123c
3 changed files with 8 additions and 0 deletions

View File

@ -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) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,6 @@
// Test unbalanced delimiters.
---
$ 1/(2 (x) $
$ 1_(2 y (x) () $
$ 1/(2 y (x) (2(3)) $