commit e744b02090a6f6280380e0c584780a3d4646643b
parent 62b4e68a1c5d325f663a49472295530c82fa980a
Author: Emily Eisenberg <emily@khanacademy.org>
Date: Fri, 26 Jul 2013 13:41:29 -0700
Move main node cleanup back
Summary: If someone wants the node to be cleared out, they will have to
do it themselves.
Auditors: alpert
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/katex.js b/katex.js
@@ -248,7 +248,6 @@ var clearNode = function(node) {
};
var process = function(toParse, baseNode) {
- clearNode(baseNode);
var tree = parseTree(toParse);
var style = Style.TEXT;
@@ -256,6 +255,7 @@ var process = function(toParse, baseNode) {
var span = makeSpan(style.cls(), expression);
var katexNode = makeSpan("katex", [span]);
+ clearNode(baseNode);
baseNode.appendChild(katexNode);
};