-
Notifications
You must be signed in to change notification settings - Fork 13.4k
rustdoc: Only hide lines starting with #
in rust code blocks
#105539
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rustdoc: Only hide lines starting with #
in rust code blocks
#105539
Conversation
I agree we should not hide # lines for non rust blocks. |
I agree that we should only hide
should render as # Header whereas currently I think it would render as nothing? EDIT: Yep, I just checked, and it renders as an empty code block. That seems like definitely unintended behavior. |
That’s four of us. |
@bors r+ rollup |
UPDATE: This is actually a stable-to-stable regression: #105527 (comment) |
Well, better late than never for an old fix. I added a "beta nominated" label so we can at least have this fix available one version sooner. |
…ines-non-rust, r=notriddle rustdoc: Only hide lines starting with `#` in rust code blocks Fixes rust-lang#105527. So before approving, this is a big question: in rust code blocks, in a line starts with a `#`, we hide it in the output. However, should we do the same for non-rust code blocks too? I think it's a bit problematic to do it because `#` can be used for many things but I prefer to check first with everyone (might also be worth updating documentation too). cc `@rust-lang/rustdoc` r? `@notriddle`
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#105411 (Introduce `with_forced_trimmed_paths`) - rust-lang#105532 (Document behaviour of `--remap-path-prefix` with several matches) - rust-lang#105537 (compiler: remove unnecessary imports and qualified paths) - rust-lang#105539 (rustdoc: Only hide lines starting with `#` in rust code blocks ) - rust-lang#105546 (Add some regression tests for rust-lang#44454) - rust-lang#105547 (Add regression test for rust-lang#104582) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…tag-prep-line, r=notriddle Extend rustdoc hashtag prepended line test Follow-up of rust-lang#105539. This case wasn't checked so better add it. r? `@notriddle`
Approved for backport in https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E66.2E0/near/315377940. Note: the |
…troalbini [stable] Prepare 1.66.0 release This PR prepares the artifacts for the 1.66.0 release. The following PRs have been backported: * rust-lang#104782 * rust-lang#105023 * rust-lang#104558 * rust-lang#104610 * rust-lang#103989 * rust-lang#104650 * rust-lang#105539 * rust-lang#105477 r? `@ghost`
…mulacrum [beta] backport rollup * Revert "Replace usage of ResumeTy in async lowering with Context" rust-lang#105915 * Don't copy symbols from dylibs with -Zdylib-lto rust-lang#105800 * rustdoc: Only hide lines starting with # in rust code blocks rust-lang#105539 * Mangle "main" as "__main_void" on wasm32-wasi rust-lang#105468 r? `@ghost`
Fixes #105527.
So before approving, this is a big question: in rust code blocks, in a line starts with a
#
, we hide it in the output. However, should we do the same for non-rust code blocks too? I think it's a bit problematic to do it because#
can be used for many things but I prefer to check first with everyone (might also be worth updating documentation too).cc @rust-lang/rustdoc
r? @notriddle