Math formula in post not display after save

AI-generated summary

The discussion revolves around a issue with math formulas not displaying properly after saving a post on a Discourse forum. dryitdry reported the problem, stating that the preview shows the formula correctly, but it reverts to text after saving. dryitdry tried switching from Mathjax to Katex, but the issue persists. Arkshine suggested testing the other math rendering option and later tried to reproduce the issue, but was unsuccessful Arkshine. The user was asked to share the forum URL to further investigate the problem.

I am running discourse(3.4.1) in the cosmos cloud

When editing the post the preview can show the formula properly.
But after I saved the post it shows text only. Actually sometimes it shows the formula briefly and revert back to text.

I’ve tried on different browsers, reset the cache and still the same.
There is no js error in the chrome broswer(inspect>>console)

What flavor are you using, Mathjax or Katex? Have you tried to test the other one if it happens too?

I was using Mathjax, changed to Katex result is the same.

Let’s try here to see.

\left. \begin{array}{l} \text{if $n$ is even:}&n/2\\ \text{if $n$ is odd:}&3n+1 \end{array} \right\} =f(n)

I can’t reproduce the issue here.
Would you be okay to share your forum URL here (or by PM if you prefer)?