LaTeX formula rendering error

When I type LaTeX formula

$$\mathbf{w} = \left(X^T X + \lambda
0 & \quad & \quad & \quad & \quad \\
\quad & 1 & \quad & \quad & \quad \\
\quad & \quad & 1 & \quad & \quad \\
\quad & \quad & \quad & \ddots & \quad \\
\quad & \quad & \quad & \quad & 1
\right)^{-1} X^T \mathbf{y}$$

Its rendering output looks like this:

I think there is something wrong. The “nbsp;” thing should not be there, because I didn’t type anything about that.

Please resubmit this bug report and make sure that: 1) you follow the bug report template, 2) you use the default theme (no css) and 3) there are no third-party plugins enabled (You can use the help vault for 2 and 3).

  is the XHTML character entity for no-break space. You can accidentally get no-break spaces in your LaTeX code by e.g. copying and converting of math formulae. To fix the issue just get rid of no-break spaces by replacing them with normal spaces or deleting them entirely.



I tried using regex and replaced all \s with space, and then the nbsp; thing truly disappeared!