Open NorthboundTrain opened 2 years ago
Same error here.
I modified .../node_modules/markdown-link-check/node_modules/link-check/lib/proto/http.js to print out URLs just before it hit the error at this is what it showed
❯ markdown-link-check -p -v README.md
FILE: README.md
https://lukeprior.github.io/nbn-upgrade-map/
https://data.gov.au/dataset/ds-dga-19432f89-dc3a-4ef3-b943-5326ef1dbecc/details
Checking... [== ] 7%https://github.com/minus34/gnaf-loader
Checking... [==== ] 15%https://minus34.com/opendata/georabble-intro-to-gnaf.pdf
Checking... [====== ] 23%https://www.nbnco.com.au/residential/upgrades/more-fibre
Checking... [======== ] 30%https://geojson.org/
Checking... [========== ] 38%https://geojson.io/
Checking... [============ ] 46%https://img.shields.io/badge/dynamic/json?label=Suburb%20Progress%20vs%20Listed&query=%24.suburbs.listed.TOTAL.percent&url=https%3A%2F%2Fraw.githubusercontent.com%2FLukePrior%2Fnbn-upgrade-map%2Fmain%2Fresults%2Fprogress.json&suffix=%
/Users/simonroberts/.asdf/installs/nodejs/14.20.0/lib/node_modules/markdown-link-check/node_modules/link-check/lib/proto/http.js:41
const url = encodeURI(decodeURIComponent(new URL(link, opts.baseUrl).toString()));
In this case, the error is caused by a bare '%' sign which should be %25 for a percent sign.
FWIW what I changed was (crudely) adding the console.log() line immediately before the line that got the error:
console.log(link)
const url = encodeURI(decodeURIComponent(new URL(link, opts.baseUrl).toString()));
OS: MacOS 12.4 markdown-link-check: 3.10.0 node: v16.15.1
I'm getting the following error with no indication where the issue is:
As a user, I would like to know what line in the source it was failing on.