-
Notifications
You must be signed in to change notification settings - Fork 146
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
markdownlint-disable/enable is the wrong pattern; use disable/restore instead #276
Comments
I'm not quite sure where the issue is, this disable/enable comment section is there to prevent a previously raised issue where MarkdownLint would complain about the table not respecting rules while still allowing it to do its job as far as the rest of the file (e.g. |
@Berkmann18 the problem is that |
@bnb That makes sense. A PR would be welcome for this. |
Here’s a visual demonstration: |
@bnb I probably won't get to this anytime soon. If you want to send the PR, please go ahead. The change is trivial, but I don't know how easy/hard it will be to add tests, etc.. |
I decided to YOLO a PR. All checks pass. Here you go: #278 |
🎉 This issue has been resolved in version 6.17.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
all-contributors-cli
version: Latestnode
version: N/Anpm
(oryarn
) version: N/ARelevant code or config
What you did:
Investigated an issue reported by @bnb where
markdownlint
rules were being ignored in a specific file that was generated by this project.What happened:
The pattern produced by this project of
<!-- markdownlint-disable -->
then<!-- markdownlint-enable -->
in the two files referenced above has the effect of (re-)enabling allmarkdownlint
rules. In cases where the relevant project/file/user has disabled some (ex:line-length
), they are undesirably enabled for the remainder of the file. Instead, use<!-- markdownlint-restore -->
to restore the previously-enabled rules.There's a discussion and example here: https://github.com/DavidAnson/markdownlint#configuration
Reproduction repository:
Any repository that uses the pattern above.
Problem description:
See above.
Suggested solution:
See above.
The text was updated successfully, but these errors were encountered: