-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
doc_markdown should ignore plain URLs #1832
Comments
This will probably get fixed by https://github.com/Manishearth/rust-clippy/pull/1799 cc @mcarton Up till now we had a thing that would kind of parse a subset of markdown. |
No it won't. A raw link like this is considered text in CommonMark. If you really want a raw link you need And those links are not rendered by |
We should probably catch raw links and report them. |
Yeah, if rustdoc won't (under CM) linkify them, then it makes sense to treat them as text, and even report them. |
Actually, looks like the
|
Ok, this I can fix. |
The
doc_markdown
rule is expected to search the plain text of a Markdown content, and should exclude non-plain-text parts, like code blocks and URLs.Plain URLs (not labeled links or URLs in brackets) are core components of markdown and should be respected as URLs and not plain text.
From the perspective of what's going on in practice: when implementing a spec in code, it's very common to put a plain URL link to the spec, as a point of reference. These URLs are most of the time very well self-descriptive and there's no need for extra work to label them.
Example: all the URLs like
http://www.unicode.org/reports/tr9/...
here: https://github.com/servo/unicode-bidi/blob/master/src/explicit.rsBased on these, clippy should no warn about any formatting issues about pain URLs, specially the backtick requirement.
Also reported back in Feb: https://github.com/Manishearth/rust-clippy/issues/1558
The text was updated successfully, but these errors were encountered: