dprint / dprint-plugin-markdown

Markdown code formatting plugin for dprint.
MIT License
25 stars 9 forks source link

Add support for multi-line mathematical blocks #77

Open lino-levan opened 1 year ago

lino-levan commented 1 year ago

Describe the bug

dprint-plugin-markdown version: 0.15.2

Input Code

$$
\begin{align}
  y = mx + b \\
  xy = 3x^2 - 7
\end{align}
$$

Expected Output

Something sane should be the output, but I think this is already fine.

$$
\begin{align}
  y = mx + b \\
  xy = 3x^2 - 7
\end{align}
$$

This renders like:

$$ \begin{align} y = mx + b \ xy = 3x^2 - 7 \end{align} $$

Actual Output

$$ \begin{align} y = mx + b \\ xy = 3x^2 - 7 \end{align} $$

This breaks rendering on Github and looks like:

$$ \begin{align} y = mx + b \ xy = 3x^2 - 7 \end{align} $$