hackmdio / hackmd-io-issues

Reporting issues about HackMD Enterprise Edition and HackMD.io

Repository from Github https://github.comhackmdio/hackmd-io-issuesRepository from Github https://github.comhackmdio/hackmd-io-issues

mhchem mathjax commands sometimes does not render properly

edwar4rd opened this issue · comments

Is this a hackmd.io issue?

Read our Official tutorial

It's on https://hackmd.io/c/tutorials/

或是中文版 https://hackmd.io/c/tutorials-tw/

What's the problem

Current behaviour

image

Provide steps to reproduce:

  1. Create a note
  2. Add $\ce{H2O}$
  3. Might or might not render the \ce command properly
  4. 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.

image

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 null error flood console
    • Uncaught (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!