mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Always throw real ParseErrors
Also sneak in a colon. Auditors: emily
This commit is contained in:
3
katex.js
3
katex.js
@@ -152,7 +152,8 @@ var buildGroup = function(style, color, group, prev) {
|
||||
} else if (group.type === "namedfn") {
|
||||
return makeSpan("mop" + color, [textit(group.value.slice(1))]);
|
||||
} else {
|
||||
throw "Lex error: Got group of unknown type: '" + group.type + "'";
|
||||
throw new ParseError(
|
||||
"Lex error: Got group of unknown type: '" + group.type + "'");
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user