Describe the bug
I don't expect any formatting changes to be applied to an indented dollar math equation, but every time I run the formatter it prepends whitespace to all but the first line of the dollar math equation.
This is a problem because it means the formatter never is successful when there is an indented dollar math equation.
Reproduce the bug
Input:
No issues here.
$$
x = 2y
$$
1. Formatter incorrectly inserts whitespace here.
$$
x = 2y
$$
Output:
No issues here.
$$
x = 2y
$$
1. Formatter incorrectly inserts whitespace here.
$$
x = 2y
$$
And if you run it again, it adds even more whitespace:
No issues here.
$$
x = 2y
$$
1. Formatter incorrectly inserts whitespace here.
$$
x = 2y
$$
List your environment
python 3.10.12
ubuntu 22.04
mdformat==0.7.22
mdformat-myst==0.2.1
Executed via mdformat CLI in a python virtual env:
python3.10 -m venv foo
source foo/bin/activate
pip install mdformat mdformat-myst
# Create a file test.md with contents listed above
mdformat ./test.md