mhchem mathjax commands sometimes does not render properly
edwar4rd opened this issue · comments
Is this a hackmd.io issue?
- Yes, the bug happens on https://hackmd.io
- No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd
Read our Official tutorial
It's on https://hackmd.io/c/tutorials/
或是中文版 https://hackmd.io/c/tutorials-tw/
What's the problem
Current behaviour
Provide steps to reproduce:
- Create a note
- Add
$\ce{H2O}$ - Might or might not render the
\cecommand properly - Refresh (F5 or Ctrl+Shift+R) the page and it might/might not work
If possible, create a note with reproducible content and share the link with us.
https://hackmd.io/@edwar4rd/SyrEd-J46
Some older notes created by others are also broken
https://hackmd.io/@hikari/H1sVJtRy5
Expected behaviour
$\ce{H2O}$ should be displayed properly as a chemical formula with auto typesetting.
Environment
I use HackMD on:
Desktop
- OS: GNU/Linux
- Browser: Firefox
- Browser Version: 119.0 (64-bit)
Desktop
- OS: GNU/Linux
- Browser: Chromium
- Browser Version: 119.0.6045.123 (Official Build)
Desktop
- OS: Windows 11
- Browser: Firefox
- Browser Version: 119.0.1(64 位元)
Desktop
- OS: Windows 11
- Browser: Chrome
- Browser Version: 119.0.6045.124 (正式版本) (64 位元)
Mobile
- OS: Android 13; SM-A5360 Build/TP1A.220624.014
- Browser: Chrome
- Browser Version: 119.0.6045.66
Tested and reproducible (sometimes after a few page refresh) in all of the above environment.
Additional context
- Might be related to recent MathJax version bump
Uncaught (in promise) TypeError: this.parent(...) is nullerror flood consoleUncaught (in promise) TypeError: Cannot read properties of null (reading 'replaceChild')when using Chromium/Chrome
- Sometimes it works sometimes it doesn't after page refresh
- I've tried clearing cache multiple times
- Maybe related to cdn cache?
We have deployed a fix, now it should display properly.
Feel free to keep us posted, thank you!
Didn't test throughly but seem fixed.
Thanks!

