Skip to content

Don't add newlines after code snippets in headers #646

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

Merged
merged 2 commits into from
Mar 18, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Mar 18, 2020

Fixes the very odd behavior on https://docs.rs/crate/winapi/0.3.8

Closes #645

r? @GuillaumeGomez


/* Don't put a newline after code fragments in headers */
h3 > code {
display: inline;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering: why inline and not inline-block?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to look up the difference - inline-block prevents newlines within the code snippet, while inline would allow line wrapping? In that case we should probably do inline-block.

https://stackoverflow.com/a/45061654/7669110

@GuillaumeGomez
Copy link
Member

Couldn't find issues so once I have an answer to my question, all good for me!

Also changes this to work on h4 since I noticed the same rustdoc style
was there too.
@GuillaumeGomez
Copy link
Member

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 7435ebc into rust-lang:master Mar 18, 2020
@jyn514 jyn514 deleted the fix-code-headers branch March 18, 2020 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Winapi's README header is rendered weirdly on docs.rs
2 participants