In this question Small Bayes Calculator to learn Javascript I ended up adding a maths appendix with a bunch of LaTeX. This LaTeX was detected as "code" and I was supposed to indent it by 4 spaces otherwise it would not let me post it. Indenting it would have prevented it from rendering the equations though, so I worked around this issue by making a picture of the perfectly fine preview and added this at the end instead of the LaTeX formulas.
The codeblock detection algorithm should either be taught LaTeX or be possible to override.