scribble-math/katex.js
Emily Eisenberg cfb9f2b31b Refactor some stuff
Summary:
Pull node making into a separate module, make an "options" param for
the make_ functions, and pull the different types of groups into separate
functions.

Test Plan: Open the homepage, make sure everything still works.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D3368
2013-08-06 14:12:06 -07:00

18 lines
405 B
JavaScript

var parseTree = require("./parseTree");
var buildTree = require("./buildTree");
var utils = require("./utils");
var ParseError = require("./ParseError");
var process = function(toParse, baseNode) {
var tree = parseTree(toParse);
var node = buildTree(tree);
utils.clearNode(baseNode);
baseNode.appendChild(node);
};
module.exports = {
process: process,
ParseError: ParseError
};