-
-
Notifications
You must be signed in to change notification settings - Fork 740
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
Warn against dead links within the document #253
Comments
Dead external links can be discovered with markdown-link-check: One file: Multiple files outputting the result into a text file: find . -name \*.md -exec npx markdown-link-check -qq {} \; > bad-links.txt Note that I used npx to avoid explicit global installation of the markdown-link-check package. |
Thanks for the pointer to markdown-link-check, but I'd prefer to have basic support as part of markdownlint instead of having to use yet another tool with different usage and a lot of functionality I don't need anyway. The dead-links use case in this issue is anchor-style links, so implementation would be:
Note this would not catch link targets within inline HTML but this is discouraged by MD033 anyway. |
@nichtich Is the anchor ID algorithm part of a specification anywhere, or are you suggesting making this specific to GitHub? |
Anchor links from header titles have been discussed in CommonMark but it's not part of CommonMark. Popular implementations that create anchor ids from header titles include Pandoc and GitHub. Pandoc also supports GitHub algorithm (see feature
For a more extensive comparison of algorithms see https://babelmark.github.io/ |
Great info, thank you! |
It would be fantastic if bad anchor-style links were detected and warned.
I wouldn't expect bad external URL links to be caught.
The text was updated successfully, but these errors were encountered: