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

Detect broken anchors #36

Open
ondrejmirtes opened this issue Jan 22, 2023 · 1 comment
Open

Detect broken anchors #36

ondrejmirtes opened this issue Jan 22, 2023 · 1 comment

Comments

@ondrejmirtes
Copy link

At https://phpstan.org/config-reference I have a broken anchor (/writing-php-code/phpdoc-types#type-aliases) but at https://phpstan.org/writing-php-code/phpdoc-types there's no anchor like that.

I'm using this action already at https://github.com/phpstan/phpstan/actions/workflows/website-links.yml but it doesn't detect this problem (there's no element with this ID).

It'd be nice if it detected this problem. Thank you.

@ScholliYT
Copy link
Owner

This is definitely a usecase whose use I can understand well. Thanks for the suggestion.

Since you can't tell from the HTTP GET request to the URL alone if the anchor exists, since 200 - OK is invariably returned even though the anchor is not there, you would have to search for the anchor in the HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants