-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature] Optionally validate the link anchor or ignore using line number as anchor #6
Comments
Hey! @zinizhu Thanks for opening this issue.
I think, we can do better than simply ignoring, and it can still stays simple. Should we validate that the line exists? In your example ( Would you mind opening a PR to implement this feature? |
Thanks for the quick response! I just verified that MD051 does not support this use case. It throws an error if I use line number as the anchor. I think what you proposed can work well! Worth to note that it is possible to have a header in the same form of the line number, e.g. a header |
Why won't to start with something that will mitigate the issue and improve over time? |
🎉 This issue has been resolved in version 2.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@electriquo I agree, havent't said the contrary. However issues are there to discuss any potential ideas to improve the library. Linters are there to catch human mistakes, as much as a machine can, of course sometimes the linter is wrong, and is detecting a mistake, which is in fact is not. Only ignoring line number fragments (e.g: Anyway, this use case is now supported in the latest version (v2.3.0), please let me know if it works for you. And please, feel free to open any new issues, if you have new feature requests or bug you've encountered, thanks! 😄 (I will try whenever I have time, to open a PR to markdownlint to also support this use case there, for the MD051 rule.) |
Thank you @theoludwig |
Thank you for supporting this in such a short span! @theoludwig |
Description
GitHub markdown supports using line length as the anchor, for example:
I don't want the linter to throw error on this.
Describe the solution you'd like
I don't know if there is a way to optionally turn on the anchor validation for a specific line, it seems a bit complex to implement.
Instead maybe just hardcode in the plugin to ignore that?
Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: