-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rustdoc does not format ASCII art containing ###
at the start of a line correctly
#105527
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
Comments
It's because of how |
This is actually a regression. I haven't bisected, but it occurred sometime between 1.50.0 and 1.63.0 based on a quick test. In 1.50.0, the following code block /// ```markdown
/// # Header
/// ```
rendered as |
Thanks for the information @camelid ! |
…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`
The regression is in nightly-2021-07-15 Commits in range: commit[0] 2021-07-13UTC: Auto merge of #86827 - camsteffen:hash-lint-resolved, r=oli-obk Maybe this happened in #87056 (merged by #87133) (cc @GuillaumeGomez) |
I tried this code:
I expected to see this happen: When I run
rustdoc
, I expect to see ASCII art in the output that matches the above example.Instead, this happened: In the output, this actually appears:
It appears that if a line starts with at least three
#
s, one gets "swallowed" somehow.Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: