KaTeX fails to render display math when length is too long
What does this MR do and why?
When math text is too long, we create a wrapper object and display a button, indicating there might be a performance issue. The mathStyle data attribute was not transferred to the block, so later display didn't use the display attribute when needed.
How to set up and validate locally
Add the following markdown to a description or comment, and preview it. After clicking the button, it should display the formula properly
```math
\begin{equation}
\bar{\mathbf{a}}
= \frac{1}{2} \left(\begin{bmatrix}0.6704028 \\ 0.1519 \\ 0.073024 \end{bmatrix} + \left(
\begin{bmatrix}
{\mathbf{\delta q}_1}_w & -{\mathbf{\delta q}_1}_x & -{\mathbf{\delta q}_1}_y & -{\mathbf{\delta q}_1}_z \\
{\mathbf{\delta q}_1}_x & {\mathbf{\delta q}_1}_w & -{\mathbf{\delta q}_1}_z & {\mathbf{\delta q}_1}_y \\
{\mathbf{\delta q}_1}_y & {\mathbf{\delta q}_1}_z & {\mathbf{\delta q}_1}_w & -{\mathbf{\delta q}_1}_x \\
{\mathbf{\delta q}_1}_z & -{\mathbf{\delta q}_1}_y & {\mathbf{\delta q}_1}_x & {\mathbf{\delta q}_1}_w
\end{bmatrix}
\begin{bmatrix}
{\mathbf{\delta q}_1}_w & {\mathbf{\delta q}_1}_x & {\mathbf{\delta q}_1}_y & {\mathbf{\delta q}_1}_z \\
-{\mathbf{\delta q}_1}_x & {\mathbf{\delta q}_1}_w & -{\mathbf{\delta q}_1}_z & {\mathbf{\delta q}_1}_y \\
-{\mathbf{\delta q}_1}_y & {\mathbf{\delta q}_1}_z & {\mathbf{\delta q}_1}_w & -{\mathbf{\delta q}_1}_x \\
-{\mathbf{\delta q}_1}_z & -{\mathbf{\delta q}_1}_y & {\mathbf{\delta q}_1}_x & {\mathbf{\delta q}_1}_w
\end{bmatrix}
\begin{bmatrix}0 \\ \left(\begin{array}{c}0.70943 \\ 0.27159 \\ -0.189162\end{array}\right) - \left(
\begin{array}{c}-0.0793108 \\ -0.721279 \\ -0.387781\end{array}\right) \end{bmatrix} \right)_{\mathbf{v}}
\right)
\end{equation}
```
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #337163 (closed)
Edited by Brett Walker