Using display maths ($$...$$ or \[...\]) in inline code blocks will result in a highly mangled message. I think it also happens for indented code blocks.
Example:
- Uses LaTeX and TeX delimiters by default. (Delimiters for inline math are `\(...\)` / `$...$` and for display math `\[...\]` / `$$...$$`)
- Multi-line inline maths using `$...$` is not allowed anymore, use `\(...\)` instead
- There must be no spaces around inline TeX style notation, good: `$\TeX$`, bad: `$ \TeX $`
- Editing existing messages will use LaTeX style delimiters
Result:

It can be fixed by adjusting the regex for display maths slightly, to only parse display maths when it starts on a new line. I believe this is acceptable since display maths will be rendered using the full page width anyway.
I will make a PR.
Using display maths (
$$...$$or\[...\]) in inline code blocks will result in a highly mangled message. I think it also happens for indented code blocks.Example:
Result:
It can be fixed by adjusting the regex for display maths slightly, to only parse display maths when it starts on a new line. I believe this is acceptable since display maths will be rendered using the full page width anyway.
I will make a PR.