-
Notifications
You must be signed in to change notification settings - Fork 12.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
Nightly rustdoc warns about code block if it contains comments and tab #48068
Comments
It is warned starting on nightly only because of #47398. If you |
Looking what's wrong. |
The warning comes if you have the following code:
But not if you have:
The whole issue being that hoedown doesn't recognize the first one as being a code block. I'll close this issue for now. This won't be thrown out when the new release will get out anyway since all hoedown will be removed from the compiler. |
@GuillaumeGomez But the gist contained space between comment and code block? |
yes, re-opening since the gist does look like what is supposed to work. |
The issue here is that hoedown converts tabs to spaces in code blocks but pulldown-cmark doesn't so rustdoc thinks it has found a new test. |
Since we don't have hoedown around anymore, can we close this issue? |
At the moment there is no warning neither in stable nor nightly :) |
The issue will only affect 1.25, so it's probably too late to fix this now. |
Then I close it for good! |
Markdown parsers and more are foited onto clients because of Skeptic. This is inspired by the conversation at budziq/rust-skeptic#60 regarding a "skeptic-lite" using rustdoc. Apparently, the stable version of rustdoc needs newlines between the preceding paragraph and the code-block. See rust-lang/rust#48068.
A code block inside documentation with
rust,no_run
directive:Nightly compiler throws a warning about it:
And
ignore
doesn't help as well though.Full sample: https://gist.github.com/anonymous/56d5eb5927c50b2a3a22f67723363f45#file-playground-rs-L5-L8
Rust version:
The text was updated successfully, but these errors were encountered: