Skip to content
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

Open
mpalmer opened this issue Mar 20, 2024 · 2 comments
Open

README example rendering doesn't hide lines #8325

mpalmer opened this issue Mar 20, 2024 · 2 comments
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Comments

@mpalmer
Copy link

mpalmer commented Mar 20, 2024

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

  1. Go to https://crates.io/crates/service-skeleton
  2. Scroll down to "Usage"
  3. Look at the first example
  4. Observe that there are lines starting with # 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.

@Turbo87
Copy link
Member

Turbo87 commented Mar 20, 2024

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.

@mpalmer
Copy link
Author

mpalmer commented Mar 20, 2024

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.

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-backend ⚙️ labels Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

No branches or pull requests

2 participants