]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/sources.rs
rustdoc: improve popover focus handling JS
[rust.git] / src / librustdoc / html / sources.rs
index 50135d6019006633eb804053085c1b8bf95a2b51..54e296959b0ec97fb569a2210d1e0054cece775f 100644 (file)
@@ -287,8 +287,11 @@ pub(crate) fn print_src(
             }
         }
         SourceContext::Embedded { offset, needs_expansion } => {
-            extra =
-                if needs_expansion { Some(r#"<span class="expand">&varr;</span>"#) } else { None };
+            extra = if needs_expansion {
+                Some(r#"<button class="expand">&varr;</button>"#)
+            } else {
+                None
+            };
             for line_number in 1..=lines {
                 let line = line_number + offset;
                 writeln!(line_numbers, "<span>{line}</span>")