Skip to content

Commit 9f9577c

Browse files
authored
Rollup merge of #83645 - pickfire:patch-3, r=GuillaumeGomez
Wrap non-pre code blocks Fix #83550 regression ``` $ cargo new --lib whitespace && cd whitespace && echo '//! `" foo "`' > src/lib.rs && cargo doc --open ``` Before ![](https://user-images.githubusercontent.com/89623/112713498-c0dfc200-8ed5-11eb-8c57-efdf26372e74.png) After ![](https://user-images.githubusercontent.com/89623/112713538-f08eca00-8ed5-11eb-8a98-675179f60ae2.png) r? ``@GuillaumeGomez`` cc ``@mgeisler``
2 parents 5b67543 + 7d21972 commit 9f9577c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustdoc/html/static/rustdoc.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ nav.sub {
424424
text-overflow: ellipsis;
425425
margin: 0;
426426
}
427-
.docblock-short code {
427+
/* Wrap non-pre code blocks (`text`) but not (```text```). */
428+
.docblock > :not(pre) > code,
429+
.docblock-short > :not(pre) > code {
428430
white-space: pre-wrap;
429431
}
430432

0 commit comments

Comments
 (0)