mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #940] MD051 - files in repo/gist #561
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#561
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anonymous1184 on GitHub (Aug 26, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/940
The rule triggers files in the same repo/gist.
Example
README.md:@DavidAnson commented on GitHub (Aug 26, 2023):
That is correct, none of the automatically generated fragments in that file match "file-readme-md".
The rule documentation explains more: https://github.com/DavidAnson/markdownlint/blob/main/doc/md051.md
If you change the top level heading to "File README MD", the warning goes away because that creates a matching fragment: https://dlaa.me/markdownlint/#%25m%23%20File%20README%20MD%0A%0A%5BSelf%5D%5B1%5D%0A%0A%5B1%5D%3A%20%23file-readme-md%0A
@anonymous1184 commented on GitHub (Aug 26, 2023):
I know, but is a valid link in GitHub and other VCS sites.
Here's an example: https://gist.github.com/64fe98f2d25c8faaeea11ebae7bf1014
Perhaps a configuration to allow this kind of links?
@DavidAnson commented on GitHub (Aug 26, 2023):
If you are saying any link fragment could potentially be valid, then you do not want any of them to trigger a warning and so you can disable rule MD051 for that file or for your project.
@anonymous1184 commented on GitHub (Aug 26, 2023):
I was thinking more about an exception for query fragments starting in
file-, as most (if not all) of the VCS sites use it.I basically only write in MD, so the extension is a must for me... super practical and highly configurable (I have projects with tabs, 2/4 spaces for indentation, some that require HTML tags, some that don't, etc...).
If there is no way to add it, I can ignore the warnings or disable it per-file (
<!-- markdownlint-disable-file MD051 -->) once I'm sure all the other links are good to go.Thanks a lot for this useful tool and your time.