mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Make safari only break on fractions
Summary: Also, make errors on the initial parse not prevent further parses. Auditors: alpert
This commit is contained in:
8
katex.js
8
katex.js
@@ -86,6 +86,10 @@ var buildGroup = function(style, color, group, prev) {
|
||||
} else if (group.type === "close") {
|
||||
return makeSpan("mclose" + color, [textit(group.value)]);
|
||||
} else if (group.type === "frac") {
|
||||
if (utils.isSafari) {
|
||||
throw new ParseError("KaTeX fractions don't work in Safari");
|
||||
}
|
||||
|
||||
var fstyle = style;
|
||||
if (group.value.size === "dfrac") {
|
||||
fstyle = Style.DISPLAY;
|
||||
@@ -244,10 +248,6 @@ var clearNode = function(node) {
|
||||
};
|
||||
|
||||
var process = function(toParse, baseNode) {
|
||||
if (utils.isSafari) {
|
||||
throw new ParseError("KaTeX doesn't work on Safari");
|
||||
}
|
||||
|
||||
clearNode(baseNode);
|
||||
var tree = parseTree(toParse);
|
||||
|
||||
|
Reference in New Issue
Block a user