elves / elvish

Powerful scripting language & versatile interactive shell
https://elv.sh/
BSD 2-Clause "Simplified" License
5.53k stars 297 forks source link

Provide more info for an invalid doc link #1752

Closed krader1961 closed 5 months ago

krader1961 commented 5 months ago

Make it more obvious why a documentation reference link is invalid when the URL path incorrectly includes a trailing slash. This would have saved me an hour of debugging when I was working on a change that included a reference like this one:

[`edit:histlist:start`](../ref/edit.html/#edit:histlist:start)

Fixes #1749

xiaq commented 5 months ago

This check should be generalized to check for all bogus slashes as well as missing slashes. I have posted a bit more explanation in https://github.com/elves/elvish/issues/1749#issuecomment-1904223636.