about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-12-05 23:54:34 +0100
committerGitHub <noreply@github.com>2018-12-05 23:54:34 +0100
commitd07d299cba0f179dca1c4052e13d49943e21f842 (patch)
treed34c98ba0ddbba3582122ceef223497ada055c65
parent650b4ed5d15cc84552b8aa196170c0e8aac144ec (diff)
parent23abd182d8bdcc82662f6cd5ba6c0c8ab61cce82 (diff)
downloadrust-d07d299cba0f179dca1c4052e13d49943e21f842.tar.gz
rust-d07d299cba0f179dca1c4052e13d49943e21f842.zip
Rollup merge of #56476 - GuillaumeGomez:invalid-line-number-match, r=QuietMisdreavus
Fix invalid line number match

If a code line is longer than the width, it then gets to the next line making the line number not matching it anymore.

r? @QuietMisdreavus
-rw-r--r--src/librustdoc/html/static/rustdoc.css2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 447300928d3..169aca011b5 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -135,7 +135,6 @@ summary {
 
 code, pre {
 	font-family: "Source Code Pro", monospace;
-	white-space: pre-wrap;
 }
 .docblock code, .docblock-short code {
 	border-radius: 3px;
@@ -303,6 +302,7 @@ nav.sub {
 
 :not(.source) .example-wrap > pre.rust {
 	width: 100%;
+	overflow-x: auto;
 }
 
 body:not(.source) .example-wrap > pre {