Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird/incorrect behaviour when checking local links #1503

Open
fenuks opened this issue Sep 21, 2024 · 0 comments
Open

Weird/incorrect behaviour when checking local links #1503

fenuks opened this issue Sep 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fenuks
Copy link

fenuks commented Sep 21, 2024

I'm using lychee 0.15.1 on Arch Linux.

Here is an example markdown document:

# Incorrect or strange behaviour
## Links not being checked
- [ ] [Test1](~/Downloads/not checked because of space)
- [ ] [Test3](/home/nonsense/not-checked2-absolute-path)

## Links checking not working because of tilde
- [Test4](~/incorrect-check)
<!-- ✗ [ERR] file:///home/me/Documents/~/incorrect-check | Failed: Cannot find file -->

# Links checked correctly
- [Test5](./correct-check)
<!-- ✗ [ERR] file:///home/me/Documents/correct-check | Failed: Cannot find file -->
$ lychee test.md 
  2/2 ━━━━━━━━━━━━━━━━━━━━ Finished extracting links                                                             Issues found in 1 input. Find details below.

[test.md]:
✗ [ERR] file:///home/fenuks/Dokumenty/notatki/correct-check | Failed: Cannot find file
✗ [ERR] file:///home/fenuks/Dokumenty/notatki/~/incorrect-check | Failed: Cannot find file

🔍 2 Total (in 0s) ✅ 0 OK 🚫 2 Errors

It seems that lychee skips links with absolute path or spaces, and it doesn't handle links with ~ as absolute links.

@mre mre added the bug Something isn't working label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants