lycheeverse / lychee

⚡ Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!
https://lychee.cli.rs
Apache License 2.0
2.22k stars 134 forks source link

Handle relative links #1481

Closed mre closed 1 month ago

mre commented 3 months ago

WIP for #1296 and #1480

This just adds a failing test based on @nobkd's minimal repro. I didn't fix the underlying issue.

mre commented 3 months ago

It doesn't run the failing test yet. See #1483. The Docker build failure is unrelated.

nobkd commented 3 months ago

Might also be interesting/relevant. Not sure if this is maybe already used by lychee. :man_shrugging: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

mre commented 1 month ago

Might also be interesting/relevant. Not sure if this is maybe already used by lychee. :man_shrugging: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

Very interesting; I never heard of it. The current implementation is pretty basic, and we don't use <base>. Looking at the docs, there seem to be quite a few different cases to be handled, so I'd like to postpone handling that for now. But thanks for the tip.

mre commented 1 month ago

Superseded by https://github.com/lycheeverse/lychee/pull/1489.