mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
Stop throwing ParseError when throwOnError is false (#1169)
* Stop throwing ParseError when throwOnError is false `render`, `renderToString`, etc. now catch ParseError and render it to the raw LaTeX (with proper escaping) and a hover title with the error. Along the way: * Use new `katex.__renderToDomTree` in katex-spec's `_getBuilt`. (This was necessary to get the new error handling in `_getBuilt`.) * Fix jest results which must always be functions, not strings. * fix lint * Fix flow error Leave error type unspecified, as we check it with instanceof. * Update katex-spec.js
This commit is contained in:
@@ -14,7 +14,7 @@ function init() {
|
||||
input.addEventListener("input", reprocess, false);
|
||||
permalink.addEventListener("click", setSearch);
|
||||
|
||||
const options = {displayMode: true, macros: {}};
|
||||
const options = {displayMode: true, throwOnError: false, macros: {}};
|
||||
const query = queryString.parse(window.location.search);
|
||||
|
||||
if (query.text) {
|
||||
|
Reference in New Issue
Block a user