Relative links aren't detected from STDIN or local files
A similar issue was reported in #183 and addressed by #217. However, this doesn't work when files are passed into STDIN, or for local files.
lychee --dump --base https://www.example.com example.html # works
lychee --dump --base https://www.example.com example # doesn't work
cat example.html | lychee --dump --base https://www.example.com # doesn't work
Could this be fixed by having --base force HTML mode?
That's a tricky one.
I thought about assuming html input if --base was a valid URL, but Markdown files can also contain relative links and be prefixed with a URL. So that alone is not a decision criteria.
lychee has an internal file-type hint, that we could expose on the CLI, even though it sounds like a workaround. https://github.com/lycheeverse/lychee/blob/363b95fe5f748a72a452ed0a9748e3a3d7e8d783/lychee-lib/src/types/input.rs#L107-L116
I'm open for suggestions on how to make the file type explicit in an ergonomic way. Alternatively maybe I'm overlooking a possibility to make it work without any file type hints.
Thank you for responding so quickly. I've attempted to address this issue in #673.