Make katex always clean up after itself
Summary: This makes it more annoying to use locally, because it goes away when you type something bad, but is much more useful in use in khan-exercises and perseus. Auditors: alpert
This commit is contained in:
parent
138facd785
commit
fa101db4e1
2
katex.js
2
katex.js
|
@ -244,6 +244,7 @@ var clearNode = function(node) {
|
|||
};
|
||||
|
||||
var process = function(toParse, baseNode) {
|
||||
clearNode(baseNode);
|
||||
var tree = parseTree(toParse);
|
||||
|
||||
var style = Style.TEXT;
|
||||
|
@ -251,7 +252,6 @@ var process = function(toParse, baseNode) {
|
|||
var span = makeSpan(style.cls(), expression);
|
||||
var katexNode = makeSpan("katex", [span]);
|
||||
|
||||
clearNode(baseNode);
|
||||
baseNode.appendChild(katexNode);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user