Fixes multi-line math in notebooks
What does this MR do?
Fixes multiline math rendering in notebook files.
test file: math.ipynb
Screenshots (if relevant)
What are the relevant issue numbers?
Closes #30900 (closed), #33074 (closed)
Edited by Phil Hughes