Correctly parse katex math in IPyhton notebooks
What does this MR do?
Fixes Math not being parsed correctly in IPython notebook files. Previously only one was being parsed, this should correctly handle the different options.
Also stops HTML going through the markdown renderer.
What are the relevant issue numbers?
Closes #30900 (closed)