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:
Emily Eisenberg
2013-07-25 19:15:16 -07:00
parent 905fb7fb71
commit 62b4e68a1c
2 changed files with 6 additions and 6 deletions

View File

@@ -2,14 +2,14 @@ window.onload = function() {
var input = document.getElementById("input");
var math = document.getElementById("math");
reprocess();
if ("oninput" in input) {
input.addEventListener("input", reprocess, false);
} else {
input.attachEvent("onkeyup", reprocess);
}
reprocess();
function reprocess() {
katex.process(input.value, math);
}