(error, expression, options)
| 15991 | |
| 15992 | |
| 15993 | const renderError = function renderError(error, expression, options) { |
| 15994 | if (options.throwOnError || !(error instanceof ParseError)) { |
| 15995 | throw error; |
| 15996 | } |
| 15997 | |
| 15998 | const node = buildCommon.makeSpan(["katex-error"], [new SymbolNode(expression)]); |
| 15999 | node.setAttribute("title", error.toString()); |
| 16000 | node.setAttribute("style", `color:${options.errorColor}`); |
| 16001 | return node; |
| 16002 | }; |
| 16003 | /** |
| 16004 | * Generates and returns the katex build tree. This is used for advanced |
| 16005 | * use cases (like rendering to custom output). |
no test coverage detected