mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
add support for unicode angle brackets, single vertical bar, double vertical bar (#1123)
* add support for unicode angle brackets * add tests, remove vertical bar changes * fix 'message not a function' errors
This commit is contained in:
@@ -17,13 +17,13 @@ beforeEach(function() {
|
||||
parseTree(actual, defaultSettings);
|
||||
return {
|
||||
pass: false,
|
||||
message: "'" + actual + "' parsed without error",
|
||||
message: () => "'" + actual + "' parsed without error",
|
||||
};
|
||||
} catch (e) {
|
||||
if (expected === undefined) {
|
||||
return {
|
||||
pass: true,
|
||||
message: "'" + actual + "' parsed with error",
|
||||
message: () => "'" + actual + "' parsed with error",
|
||||
};
|
||||
}
|
||||
const msg = e.message;
|
||||
@@ -31,20 +31,20 @@ beforeEach(function() {
|
||||
if (msg === exp) {
|
||||
return {
|
||||
pass: true,
|
||||
message: "'" + actual + "'" +
|
||||
message: () => "'" + actual + "'" +
|
||||
" parsed with error '" + expected + "'",
|
||||
};
|
||||
} else if (msg.slice(0, 19) === prefix) {
|
||||
return {
|
||||
pass: false,
|
||||
message: "'" + actual + "'" +
|
||||
message: () => "'" + actual + "'" +
|
||||
" parsed with error '" + msg.slice(19) +
|
||||
"' but expected '" + expected + "'",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
pass: false,
|
||||
message: "'" + actual + "'" +
|
||||
message: () => "'" + actual + "'" +
|
||||
" caused error '" + msg +
|
||||
"' but expected '" + exp + "'",
|
||||
};
|
||||
|
Reference in New Issue
Block a user