Closed lolbat closed 1 year ago
Hi @lolbat, sorry for my late reply, and thanks for reporting this.
Yes, this is definitely an issue. I thought KaTeX escaped $
with a backslash by default, but I was either mistaken or that's not working.
I added a line of JavaScript that fixes the issue. It replaces all instances of \\$
with <span>$</span>
. So going forward, you should be able to escape KaTeX by putting a double backslash in front of your dollar signs (like \\$
) to represent a normal dollar sign.
Hopefully that helps! Let me know if you have any questions.
Nevermind - I should have tested it some more. I had to rollback my fix. The solution does fix your issue, but it has the unintended consequence of disabling the light/dark button.
I am re-opening this issue and will play with it some more to try to get a permanent fix for it soon.
@lolbat this should be fixed now. Can you pull the latest updates and confirm?
Thanks!
I downloaded it and tested. Works fine now. Thanks
If you add content in post or page that uses $ to indicate currency and there is more than one on a line it triggers
renderMathInElement()
and converts the text to mathml.So this content
starts to have sections of it rendered as mathml starting and ending with the currency characters.
Even if you try to escape them the content still gets rendered as mathml