mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
added position property to ParseError
This commit is contained in:
@@ -1040,3 +1040,13 @@ describe("An accent builder", function() {
|
||||
expect(getBuilt("\\vec )^2")[0].classes).not.toContain("mclose");
|
||||
});
|
||||
});
|
||||
|
||||
describe("A parser error", function () {
|
||||
it("should report the position of an error", function () {
|
||||
try {
|
||||
parseTree("\\sqrt}");
|
||||
} catch (e) {
|
||||
expect(e.position).toEqual(5);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user