mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
frontend: Show KaTeX errors not related to syntax.
This commit is contained in:
committed by
Tim Abbott
parent
c1fea74a65
commit
8f8efb4664
@@ -377,8 +377,11 @@ function handleTex(tex, fullmatch) {
|
|||||||
try {
|
try {
|
||||||
return katex.renderToString(tex);
|
return katex.renderToString(tex);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
if (ex.message.startsWith('KaTeX parse error')) { // TeX syntax error
|
||||||
return '<span class="tex-error">' + escape(fullmatch) + '</span>';
|
return '<span class="tex-error">' + escape(fullmatch) + '</span>';
|
||||||
}
|
}
|
||||||
|
blueslip.error(ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function python_to_js_filter(pattern, url) {
|
function python_to_js_filter(pattern, url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user