tcort / markdown-link-check

checks all of the hyperlinks in a markdown text to determine if they are alive or dead
ISC License
582 stars 118 forks source link

Started failing for valid link containing %28/%29 after release of link-check@4.5.3 #142

Closed DavidAnson closed 3 years ago

DavidAnson commented 3 years ago

This worked 24 hours ago (I run CI nightly) with v3.8.3 and fails now with v3.8.4. However, downgrading to v3.8.3 does not help. Perhaps a dependency updated their patch version?

pi@pi:~/m-l-c $ cat issue.md 
# Issue

[link](https://en.wikipedia.org/wiki/Glob_%28programming%29)

pi@pi:~/m-l-c $ npm install markdown-link-check --no-package-lock
+ markdown-link-check@3.8.4

pi@pi:~/m-l-c $ ./node_modules/.bin/markdown-link-check --verbose issue.md 

FILE: issue.md
[✖] https://en.wikipedia.org/wiki/Glob_%28programming%29 → Status: 400

1 links checked.

ERROR: 1 dead links found!
[✖] https://en.wikipedia.org/wiki/Glob_%28programming%29 → Status: 400
pi@pi:~/m-l-c $ 
DavidAnson commented 3 years ago

Downgrading to link-check@4.5.2 fixes the break.

DavidAnson commented 3 years ago
pi@pi:~/m-l-c $ cat issue.md 
# Issue

[link](https://en.wikipedia.org/wiki/Glob_%28programming%29)

pi@pi:~/m-l-c $ npm install markdown-link-check@3.8.3 --no-package-lock
+ markdown-link-check@3.8.3

pi@pi:~/m-l-c $ npm install link-check@4.5.2 --no-package-lock
+ link-check@4.5.2

pi@pi:~/m-l-c $ ./node_modules/.bin/markdown-link-check --verbose issue.md 

FILE: issue.md
[✓] https://en.wikipedia.org/wiki/Glob_%28programming%29 → Status: 200

1 links checked.
pi@pi:~/m-l-c $ 
NicolasMassart commented 3 years ago

I reproduced and confirmed the bug. I will investigate on the link-check side first.

TriplEight commented 3 years ago

Also fails on this link: https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model

TriplEight commented 3 years ago

For those who uses markdown-link-check within gaurav-nelson/github-action-markdown-link-check/ Github Action I've had an issue with %20 in URL and had to workaround it with https://github.com/gaurav-nelson/github-action-markdown-link-check/issues/85

kingthorin commented 3 years ago

I've encountered numerous failures in the last 2 days since the latest was pushed. As noted above all occurrences have URLEncoded elements. Ex:

tcort commented 3 years ago

I've published version 3.8.5 which should solve this.

TriplEight commented 3 years ago

@tcort thanks, but it doesn't seem working: https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/86

TriplEight commented 3 years ago

$someone has fixed my example link https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model and now I fail to find a good example with %20

NicolasMassart commented 3 years ago

It looks like https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/86 tests are successful.

The correct Polkadot link is https://research.web3.foundation/en/latest/polkadot/economics/1-token-economics.html#inflation-model, the one you provided is broken and is reported as broken by link-check not because of the % but because the page doesn't exist (deleted?) and was not redirected, that seems correct to me.

TriplEight commented 3 years ago

yes, the link was as I mentioned yesterday. Now I'll put https://www.google.com/?q=url%20with%20a%20space to a test. And yes, it's working.

kingthorin commented 3 years ago

Thanks, I've only been able to re-tests one occurrence but it does seem fixed.