-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[bug] Inline code block starting with space is trimmed #65555
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
Comments
Thanks for opening this issue @jhpratt! I moved this issue from |
Thanks! Wasn't sure if rustdoc had its own repo. |
Fix is in #65613. |
Thanks @Mark-Simulacrum! |
As discussed in #65613, better keep it as is and let users decide what they want on their own. |
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Nov 25, 2019
…, r=GuillaumeGomez Preserve whitespace inside one-backtick codeblocks Previously this was only done inside short docblocks (e.g., summary lines), but we should also do so in general. Fixes rust-lang#65555
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In some documentation that I recently wrote, I had an inline code block that has a leading space.
This is rendered as
<code>5</code>
— notice the lack of a leading space.Given that the documentation in question is literally to show how a leading space is added, and given that code blocks otherwise display content as-is, this seems like a bug to me.
Reference for full source code in case this behavior isn't consistent: https://github.com/time-rs/time/blob/7dc4cf32c48d4e5113661423b4869b5015decb64/src/lib.rs#L80-L84
The text was updated successfully, but these errors were encountered: