Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block attributes formatting introduce extra empty line #25

Open
kdeldycke opened this issue Apr 1, 2023 · 1 comment
Open

Block attributes formatting introduce extra empty line #25

kdeldycke opened this issue Apr 1, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@kdeldycke
Copy link
Contributor

kdeldycke commented Apr 1, 2023

Describe the bug

context
When block attributes are formatted, an extra line is added.

expectation
I expect the following MyST code to be left as-is by mdformat, as it looks pretty well formatted to me:

{caption="`GROUPS` - Description."}
```mermaid
flowchart
    (...)
```

bug
But instead, the code above gets re-formatted like this:

{caption="`GROUPS` - Description."}

```mermaid
flowchart
    (...)
```

Notice the extra blank line introduced.

problem
I think this is a problem if I compare all canonical reference from the MyST-parser documentation.

Reproduce the bug

$ cat ./block-attributes.md
{caption="`GROUPS` - Description."}
```mermaid
flowchart
    (...)
```
$ mdformat ./block-attributes.md
$ cat ./block-attributes.md
{caption="`GROUPS` - Description."}

```mermaid
flowchart
    (...)
```

List your environment

$ mdformat --version
mdformat 0.7.16 (mdformat_myst: 0.1.5, mdformat_tables: 0.4.1, mdformat_frontmatter: 2.0.1)
@kdeldycke kdeldycke added the bug Something isn't working label Apr 1, 2023
@welcome
Copy link

welcome bot commented Apr 1, 2023

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant