-
-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Description
Bizarrely, using a base-url causes lychee to fail to resolve local links except for root-relative links.
We will make a test file which has 3 local links, all of which should be valid.
touch a.html b.html
echo "[a](a.html)
[b](/b.html)
[b](file://$(pwd)/test.md)
[b](https://github.com)
" > test.md
cargo run -- --verbose --base-url $(pwd) test.mdThe output is doubly surprising because the file:// URLs which are errors actually exist on disk, and the one which does not exist on disk is counted as valid.
[ERROR] file:///home/rina/progs/lychee/a.html | Cannot find file: File not found. Check if file exists and path is correct
[200] file:///b.html
[200] https://github.com/
[ERROR] file:///home/rina/progs/lychee/test.md | Cannot find file: File not found. Check if file exists and path is correct
I think that there's some double-handling of base-url in file checker, which is re-inserting base URL to the beginning of all file:// URLs. This makes the file:///b.html valid and it makes the other ones into broken links like
file:///home/rina/progs/lychee/home/rina/progs/lychee/test.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels