-
Notifications
You must be signed in to change notification settings - Fork 0
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
Literal block content is re-formatted (wrongly) #36
Comments
I can replicate the issue after first formatting with pipx install mdformat && pipx inject mdformat mdformat-config && mdformat tmp.md Generates: # A B C
1. Create a `.pre-commit-config.yaml` file in your repository and add the desired
hooks. For example:
\`\`\`yaml
repos:
- repo: https://github.com/psf/black
rev: v24.4
\`\`\`
The problem is that 1. List
\`\`\`md
# Title
Content
1. Numbered List
* Unordered Sub-List
\`\`\` And the root cause is Edited: code blocks within code blocks aren't handled by Github's renderer |
With the following content:
Run with
mdformat --align-semantic-breaks-in-lists --number
, the content is re-formatted to:Note that the yaml content has been re-formatted. The re-formatting of the content within code blocks is not desirable (risky).
Note that if you try to re-format the re-formatted code, you get an error:
The text was updated successfully, but these errors were encountered: