Closed r-this closed 1 year ago
Markdownlint has never formatted code blocks, that would have been prettier or another extension
Nick, hey, thanks for the fast response. It helps. Happy Holidays!
On Thu, Dec 22, 2022, at 10:55 PM, Nick Schonning wrote:
Markdownlint has never formatted code blocks, that would have been prettier or another extension
— Reply to this email directly, view it on GitHub https://github.com/DavidAnson/vscode-markdownlint/issues/272#issuecomment-1363614568, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUNXNWETFBLOD6EG7O4YGLWOUWDFANCNFSM6AAAAAATHMIKYM. You are receiving this because you authored the thread.Message ID: @.***>
Thanks again. I fixed my issue and markdownlint was caught up in it, though not causing it. Wanted to post my fix to save someone else's morning:
"source.fixAll.markdownlint": true
to the Editor: Format On Save settings to get that automatic fixing of markdownlint errors back.I found that after disabling Prettier and all other Markdown and formatting plugins, md files were still auto-fixing formatting issues. If I disabled markdownlint, this behavior stopped. Guessing this all happened as an unintended result of installing and uninstalling a couple of SQL Linters/Formatter extensions. It was half-working with markdownlint set as formatter because it was using internal features to deal with the markdownlint errors, since that field can be set to any extension and others did not have the same behavior. I don't know.
Glad you got this sorted out, thank you for the detailed explanation! I wish the automatic formatting stuff were a little more obvious in VS Code because I've had questions about this before and not everyone is aware of the settings and configuration like you are.
For some reason it stopped automatically cleaning up json code blocks on save. It will still do it if I Force Reformat on the page. It is still doing the other automatic formatting, eg it will automatically remove a ':' from the end of a heading which Prettier will not, so I'm pretty sure it's markdownlint doing it. There are no messages popping up in dev console or Output when I save with the unformatted json.
I know it's pretty vague. Tried to search for others who've encountered similar issues. Let me know if you have any ideas. Thanks!