Skip to content

Blockquoted dollar math equation results in error message #38

@e13h

Description

@e13h

Describe the bug

When I have a blockquoted dollar math equation:

> $$
x = 2y
$$

I expect the formatter to treat this as valid markdown. Instead, I get the following error message:

$ mdformat test.md
Error: Could not format "test.md".

Formatted Markdown renders to different HTML than input Markdown. This is a bug
in mdformat or one of its installed plugins. Please retry without any plugins
installed. If this error persists, report an issue including the input Markdown
on https://github.com/hukkin/mdformat/issues. If not, report an issue on the
malfunctioning plugin's issue tracker.

This is a problem because blockquoted dollar math equations is valid in the myst markdown spec.

Reproduce the bug

Create a file test.md with the following contents:

> $$
x = 2y
$$

Run mdformat.

Expected no changes to the file, instead getting an error from the mdformat command (see above for error).

List your environment

python 3.10.12
ubuntu 22.04

mdformat==0.7.22
mdformat-myst==0.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions