-
Notifications
You must be signed in to change notification settings - Fork 591
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
README example rendering doesn't hide lines #8325
Comments
they're also showing up on https://github.com/mpalmer/service-skeleton#usage, which is what we're roughly trying to match. these lines are only hidden on docs output. |
Yeah, I expect them to show up on GitHub, because it's not likely to understand rustdoc conventions. I figured crates.io, being a Rust-specific site, would be more likely to follow how rustdoc does things, but if not, I guess I'll just have to pull the examples out of the readme, or learn to live with it. |
I think I missed this issue while travelling in March. (Sorry, @Turbo87!) I'm kind of -0 on this, honestly. docs.rs also doesn't treat README files with rustdoc/doctest conventions: note that the Also, unless I'm missing something (probable), But, again, I'm -0, not -1. I guess I think of standalone Markdown files as being a little bit different to inline documentation, but it wouldn't be the first time I have weird ideas about things that most people don't. 😆 |
@rust-lang/crates-io any other thoughts on this topic? |
we discussed this issue in our team meeting last week and concluded that while we don't have a strong opinion we are leaning towards mimicking what GitHub does, instead of Rustdoc. the best way forward for you would be to find an example snippet for the readme that does not need hidden lines. that will have the added benefit of also rendering the same on GitHub then. |
Current Behavior
I just looked at the crates.io page for my crate,
service-skeleton
, and noticed that the lines that I thought I'd hidden (using the standard rustdoc mechanism) are showing up in the rendering of the README (such as the line in the first example, under the "Usage" heading, that reads// Yes, this is cheating
and the line before/after).Expected Behavior
The lines that I'm trying to hide wouldn't show up in the README rendering on crates.io.
Steps To Reproduce
#
visible.Environment
No response
Anything else?
It's possible I've misunderstood how doctests work, in which case, my apologies, and I'd appreciate a pointer towards what I should be doing instead.
The text was updated successfully, but these errors were encountered: