mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 04:08:43 +00:00
Rename katex.process
to katex.render
Test plan: - Make sure tests work and huxley tests didn't change Auditors: alpert
This commit is contained in:
4
katex.js
4
katex.js
@@ -16,7 +16,7 @@ var utils = require("./utils");
|
|||||||
* Parse and build an expression, and place that expression in the DOM node
|
* Parse and build an expression, and place that expression in the DOM node
|
||||||
* given.
|
* given.
|
||||||
*/
|
*/
|
||||||
var process = function(toParse, baseNode) {
|
var render = function(toParse, baseNode) {
|
||||||
utils.clearNode(baseNode);
|
utils.clearNode(baseNode);
|
||||||
|
|
||||||
var tree = parseTree(toParse);
|
var tree = parseTree(toParse);
|
||||||
@@ -34,7 +34,7 @@ var renderToString = function(toParse) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
process: process,
|
render: render,
|
||||||
renderToString: renderToString,
|
renderToString: renderToString,
|
||||||
ParseError: ParseError
|
ParseError: ParseError
|
||||||
};
|
};
|
||||||
|
@@ -27,7 +27,7 @@ function init() {
|
|||||||
reprocess();
|
reprocess();
|
||||||
|
|
||||||
function reprocess() {
|
function reprocess() {
|
||||||
katex.process(input.value, math);
|
katex.render(input.value, math);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
query[split[0]] = decodeURIComponent(split[1]);
|
query[split[0]] = decodeURIComponent(split[1]);
|
||||||
}
|
}
|
||||||
var mathNode = document.getElementById("math");
|
var mathNode = document.getElementById("math");
|
||||||
katex.process(query["m"], mathNode);
|
katex.render(query["m"], mathNode);
|
||||||
document.getElementById("pre").innerHTML = query["pre"] || "";
|
document.getElementById("pre").innerHTML = query["pre"] || "";
|
||||||
document.getElementById("post").innerHTML = query["post"] || "";
|
document.getElementById("post").innerHTML = query["post"] || "";
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user