insert following code to the conversation:
var OPEN_TAG = /\[%/;
Message shows as code block with following error inside:
var OPEN_TAG = /
KaTeX parse error: Expected 'EOF', got '%' at position 22: 鈥 CLOSE_TAG = /%滩
/;
Message shows as code block without any KaTeX error inside:
var OPEN_TAG = /\[%/;
@iegik Do we want that rather than rendering katex parse error in the output block of katex messages, It should render the input message in the katex box?
Some example instances I ran into today...


@savish28 I think, that will be nice to leave errored message "as is" and append KaTeX error bellow the message block.
To be sure, user understanding where error occurs - we may underline place where it occurs.
KaTeX should not act on any code blocks or inline code items. Those are supposed to be rendered verbatim in a monospace font, perhaps with colors, per the Markdown standard. It's not just code that gets messed up by KaTeX. Even typing a dollar sign in plain text seems to trigger the bug, and there is no obvious escape sequence to type a literal dollar sign. Please fix this ASAP.
I agree with @gloriouschaos, code blocks and inline code should have no further rendering applied to them, since (aside from unintended code triggering formatting) it becomes impossible to do something like show the verbatim text one would use to achieve a certain format/rendering appearance.
Most helpful comment
KaTeX should not act on any code blocks or inline code items. Those are supposed to be rendered verbatim in a monospace font, perhaps with colors, per the Markdown standard. It's not just code that gets messed up by KaTeX. Even typing a dollar sign in plain text seems to trigger the bug, and there is no obvious escape sequence to type a literal dollar sign. Please fix this ASAP.