gaurav-nelson / github-action-markdown-link-check

Check all links in markdown files if they are alive or dead. 🔗✔️
MIT License
410 stars 76 forks source link

Images are checked as if they're links #1

Closed agisilaos closed 5 years ago

agisilaos commented 5 years ago

👋 Hello there, I tested this action recently, and after the first test, I observed that images are checked as if they're links. Here's what I mean. Below you can find part of the log.

FILE: ./_posts/2018-04-27-WWDC Scholarship Application A Process in Review.md
[✖] /images/wwdc-post/passion.png
[✖] /images/wwdc-post/chapterOne.png
[✖] /images/wwdc-post/Submission-Status.png

As you can see above, this is a valid syntax for images, so I'm not sure why action checks them as if they're links.

gaurav-nelson commented 5 years ago

Thank you @agisilaos

This is because markdown-link-check utility checks for images, references, and hyperlinks. I think it expects relative links while checking. So if you update you links to make them relative links, it will pass the test. For this case, use ../images instead of /images.

FILE: 2018-04-27-WWDC Scholarship Application A Process in Review.md
Checking... [=========================] 100%
[✓] ../images/wwdc-post/passion.png
[✖] /images/wwdc-post/chapterOne.png
[✖] /images/wwdc-post/Submission-Status.png

ERROR: dead links found!

If you think, it should work by default, please see https://github.com/tcort/markdown-link-check and create a new issue.

agisilaos commented 5 years ago

Thank you for the detailed explanation. I will most likely open an issue since /images is a valid syntax. Thanks again!