mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53: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,7 +377,10 @@ function handleTex(tex, fullmatch) {
|
|||||||
try {
|
try {
|
||||||
return katex.renderToString(tex);
|
return katex.renderToString(tex);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
return '<span class="tex-error">' + escape(fullmatch) + '</span>';
|
if (ex.message.startsWith('KaTeX parse error')) { // TeX syntax error
|
||||||
|
return '<span class="tex-error">' + escape(fullmatch) + '</span>';
|
||||||
|
}
|
||||||
|
blueslip.error(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user