mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #325] markdownlint-rule-github-internal-links #2127
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#2127
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 @edemaine on GitHub (Aug 30, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/325
(Until we have Discussion forums everywhere, this seems like the best way to mention the following:)
I just wrote a custom markdownlint rule that checks all internal links according to the anchor generation that Github does in its Markdown rendered (e.g. for
README.mdfiles). Because anchor generation is specific to the Markdown renderer, I figured a custom rule made more sense than a PR to markdownlint itself, but I'm happy to submit a PR if you'd rather.I think I got everything right, including the NPM keywords, but this is my first contribution "to" markdownlint, so let me know if you see anything I could improve.
I tested it on this pretty complicated Markdown file which includes fun features like
<img>tags in the headings. (Testing all the links in this document was my motivation for writing this plugin.)Anyway, hope this is helpful, and thanks for the great tool! Writing a plugin was quite straightforward. Feel free to close this issue.
@DavidAnson commented on GitHub (Aug 30, 2020):
This is awesome, thanks for sharing! I will give it a try soon and maybe add it to my nightly CI run. I see you have already added the appropriate keyword, so it shows up at https://www.npmjs.com/search?q=keywords:markdownlint-rule where others will be able to find it easily. Congratulations!
FYI, you may want to mention https://github.com/DavidAnson/markdownlint-cli2 in your notes. It's a very new project I started as an alternative to the original CLI.
@DavidAnson commented on GitHub (Aug 30, 2020):
I'm not a CoffeeScript person, but a quick scan of your implementation looked perfectly reasonable. Thanks again for doing this!
@edemaine commented on GitHub (Aug 30, 2020):
Thanks! I hadn't looked at markdownlint-cli2 much yet, but just figured out how to use it with custom rules, and added corresponding documentation to the README. Nice that you can specify custom rules in the config instead of the command line!