Open elliotweiser opened 7 months ago
Hi, thanks for trying out mdformat-gfm
!
Locally, I ran the latest version of mdformat
with the below markdown file and the plugin didn't modify the formatting within the code block.
```diff
- build_args: |
- "my_host=${{ vars.MY_HOST }}"
- secrets:
- "my_token=${{ secrets.MY_TOKEN }}"
- "my_user=${{ vars.MY_USER }}"
- "my_host=${{ vars.MY_HOST }}"
```
Steps:
pipx install mdformat
pipx inject mdformat mdformat-gfm
mdformat ./tmp.md
Do you have another mdformat
plugin installed? mdformat-gfm
doesn't modify any text within backticks, but there are a number of other plugins which could be removing the whitespace
Do you have another mdformat plugin installed? mdformat-gfm doesn't modify any text within backticks, but there are a number of other plugins which could be removing the whitespace
Very possible. I'll dig deeper and see what comes up. There's quite a bit going on in terms of formatting, and I believe we're have at least a few plugins to mdformat
at play. Thanks for the sanity-check and repro steps-- I'll give this a shot just to be sure.
@elliotweiser, did you find out what plugin was the problem?
Currently, git-diff style code blocks do not appear to be supported/respected by the formatter, particularly when describing a list of deletions. As a result, a GitHub workflow snippet appears to be treated as YAML rather than a git diff. As a result...
This content:
Is formatted to this:
At a glance, this is just whitespace, but important information gets lost about the structure of the described source file. It would be great to see this use-case supported.
It's certainly possible that I'm doing something wrong.