UmbrellaDocs / linkspector

Uncover broken links in your content.
Apache License 2.0
55 stars 8 forks source link

[BUG] Accented anchor links give false positive errors #60

Closed kaktusztea closed 3 weeks ago

kaktusztea commented 1 month ago

Hi!

I use - for now - linkspector locally by running linkspector check in my "md" directory to verify my whole documentation - written is markdown and used many links between pages and sections (with anchor links): https://github.com/kaktusztea/km100/tree/master/md

I got lots of lots of false errors.

Example: I have this markdown https://github.com/kaktusztea/km100/blob/master/md/070_tavolsagi_harc.md

It has this link:

Lásd még: [Szándékos kitérés lövés elől](070_tavolsagi_harc.md#sz%C3%A1nd%C3%A9kos-kit%C3%A9r%C3%A9s-l%C3%B6v%C3%A9s-el%C5%91l) fejezetet.

... which lands here well: https://github.com/kaktusztea/km100/blob/master/md/070_tavolsagi_harc.md#sz%C3%A1nd%C3%A9kos-kit%C3%A9r%C3%A9s-l%C3%B6v%C3%A9s-el%C5%91l

... but linkspectors throws this error:

🚫 070_tavolsagi_harc.md, 070_tavolsagi_harc.md#sz%C3%A1nd%C3%A9kos-kit%C3%A9r%C3%A9s-l%C3%B6v%C3%A9s-el%C5%91l , 404, 7, Cannot find section: #sz%C3%A1nd%C3%A9kos-kit%C3%A9r%C3%A9s-l%C3%B6v%C3%A9s-el%C5%91l in file: /Users/kaktusz/repo/km100.code/md/070_tavolsagi_harc.md.

Actually I have hundreds of false positive errors with accended anchor links. I also use unicode characters in links like 🔵, 🅿️ or 🔁. All the accented and unicode characters are HTML encoded in the links, maybe that is the reason Linkspector can not handle them.

Full error log output

linkspector_errors.txt

best regards.

gaurav-nelson commented 1 month ago

Thank you, @kaktusztea, for describing the issue in detail. I'll check.