Forbid links to localhost with Markdownlint #25542
Labels
Content:WebAPI
Web API docs
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Summary
This happens in #23675
A few links lead to
https://localhost:5042/...
.These are always erroneous. We should:
/...
(like we do forhttps://developer.mozilla.org/
)URL
None that I know.
Reproduction steps
[HTMLElement](https://localhost:5042/en-US/docs/Web/API/HTMLElement)
Expected behavior
A flaw is reported.
The link is transformed into the equivalent of
[HTMLElement](/en-US/docs/Web/API/HTMLElement)
Actual behavior
No flaw reported
A broken link.
Device
Desktop
Browser
Chrome
Browser version
Stable
Operating system
Android
Screenshot
No response
Anything else?
I think we can solve this issue by adding an extra alternative at: https://github.com/mdn/yari/blob/main/build/flaws/broken-links.ts#L232
Something similar to:
But for
https://localhost[:wxyz]?
If this is the right way, I can create a PR.
Validations
The text was updated successfully, but these errors were encountered: