-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
ready to implementFeature has reached rough consensus among editors and is ready to be implementedFeature has reached rough consensus among editors and is ready to be implemented
Description
Summary
Many authors attempt to bypass markdown-rel-links by putting their URL in backticks:
Check out `https://google.com`.We should add a lint to make sure that all HTTP(S) URLs that are not hyperlinked (so in code fences, backticks, plain text, etc.) use example domains. Specifically, the following (and any subdomains thereof) would be allowed:
exampleexample.comexample.netexample.orginvalidtest
Examples
Disallowed
The following snippets should trigger this lint:
-
Check out `https://google.com/hello`.
- Disallowed because:
- the domain is not on the list above; and
- the URL is not in a link.
- Disallowed because:
-
With the following command: ``` curl https://google.com/hello ```
- Disallowed because:
- the domain is not on the list above; and
- the URL is not in a link.
- Disallowed because:
-
Here is an unhyperlinked link http://google.com- Disallowed because:
- the domain is not on the list above; and
- the URL is not in a link.
- Disallowed because:
Allowed
While the following should not trigger this lint:
-
Check out `https://example.com/hello`.
- Allowed because the domain is on the approved list above.
-
With the following command: ``` curl https://google.com.invalid/hello ```
- Allowed because the domain is on the approved list above.
-
<https://google.com>
- Allowed because the URL appears in a link.
-
[boop](https://google.com)
- Allowed because the URL appears in a link.
-
[boop] [boop]: https://google.com
- Allowed because the URL appears in a link.
Metadata
Metadata
Assignees
Labels
ready to implementFeature has reached rough consensus among editors and is ready to be implementedFeature has reached rough consensus among editors and is ready to be implemented