Skip to content

LaTeX parsing: display math in inline code blocks mangles message #17095

@rda0

Description

@rda0

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:

image

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.

Metadata

Metadata

Assignees

Labels

A-MathsRender LaTeX maths in messagesT-Defect

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions