-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Link checker: Check for double forward slashes #3562
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot reproduce the test.
Debugging shows that class DoubleSlashCheck
does not participate in the link checker run.
What is the scenario and expected behavior for failing test?
The scenario is a writer adding an extra forward slash when entering a URL in an The expected behavior of a failing test is any occurrence of a double forward slash in an For example: Fail Pass The new class actually runs with the other checks (e.g., ImageCheck, ScriptCheck, LinkCheck, DoubleSlashCheck). |
The new class doesn't run on my environment, I still see only ImageCheck, ScriptCheck, LinkCheck. |
Have you tried running |
ah, now I see it |
Oops! That wasn't my intention. I assumed that the hook would invoke the new class. Let me know how we can change or optimize the new class. I was just looking for the quickest way to get this working. I'm open to suggestions. |
Working on it |
running tests |
This PR is a:
Summary
When this pull request is merged, it will add a custom test called
DoubleSlashCheck
to extend the html-proofer library, since the library doesn't natively check for this scenario. See gjtorikian/html-proofer#386.URLs with double slashes will cause 404s on our website because our hosting solution doesn't automatically strip extra forward slashes from URLs like normal web servers.
This PR also fixes existing instances of double forward slashes in URLs.