MCPcopy Index your code
hub / github.com/TruthHun/BookStack / katex_renderError

Function katex_renderError

static/katex/katex.js:16374–16383  ·  view source on GitHub ↗
(error, expression, options)

Source from the content-addressed store, hash-verified

16372
16373
16374var katex_renderError = function renderError(error, expression, options) {
16375 if (options.throwOnError || !(error instanceof src_ParseError)) {
16376 throw error;
16377 }
16378
16379 var node = buildCommon.makeSpan(["katex-error"], [new domTree_SymbolNode(expression)]);
16380 node.setAttribute("title", error.toString());
16381 node.setAttribute("style", "color:" + options.errorColor);
16382 return node;
16383};
16384/**
16385 * Generates and returns the katex build tree. This is used for advanced
16386 * use cases (like rendering to custom output).

Callers 2

katex_renderToDomTreeFunction · 0.85
katex_renderToHTMLTreeFunction · 0.85

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected