mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +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 {
|
||||
return katex.renderToString(tex);
|
||||
} 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