-
Notifications
You must be signed in to change notification settings - Fork 116
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
URL in front matters yaml/toml/json are wrongly picked as markdown URLs #128
Comments
Cloud flare has anti bot protection ( it requires to have a cookie or else solve a captcha) so we can't test theses urls. You may need to exclude them by adding a pattern in the config file : Marked as duplicate of #109 Let me know if the workaround is enough for now until we fix #109 thanks. |
The workaround is enough, thanks. For example, I'm experiencing the same issue on another link: Can I use a tool like curl in order to find the existence of the anti-bot?
|
It's not easy. You can first try to visit the site with a browser where you block all cookies and disable all javascript. It should display some captcha or error if the site is protected. But in your cases, for https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.js or https://www.nationalgeographic.com/science/phenomena/2015/04/24/when-hubble-stared-at-nothing-for-100-hours/, it seems that it's only that the site is very slow to answer and the test times out.
Otherwise you will have to increase the timeout, but we are still trying to figure how to merge this PR #129 I love this Hubble picture by the way, nice gravitational lenses. |
Thank you for your reply. And sorry to reopen, but I really think there is a bug when checking markdown files with yaml or json front matters. Step to reproduce: Create 2 files with the same link:
and
The output is:
I also tried with different links, and got the same behavior. |
Sorry your first questions were not clear enough and the fact that the links were really not valid did not help. |
After some analysis and reproducing the issue, it clearly appears that it's an issue with the markdown parser https://github.com/markdown-it/markdown-it and that it's a known limitation and they made some choices. See markedjs/marked#485 |
I use Hugo static site generator to write articles and generate web pages. Hugo uses front matter in yaml or json format.
So the following is a valid markdown page:
When markdown-link-check run against the file above, the link extracted is wrong and wrongly evaluated:
The text was updated successfully, but these errors were encountered: