Skip to content

Commit 7ab4e21

Browse files
committed
---
yaml --- r: 104687 b: refs/heads/snap-stage3 c: 7a70ec1 h: refs/heads/master i: 104685: 3dc47ee 104683: 1b5fb4a 104679: d9d14df 104671: c620895 v: v3
1 parent 485ee27 commit 7ab4e21

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f22c96cc888eac4c1c5d44ea4765e5c2a65f64f3
4+
refs/heads/snap-stage3: 7a70ec1ba6e64949cab5edcad33b0d7538065884
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustdoc/html/markdown.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ pub fn render(w: &mut io::Writer, s: &str, print_toc: bool) -> fmt::Result {
209209
};
210210

211211
// Render the HTML
212-
let text = format!(r#"<h{lvl} id="{id}">{sec_len,plural,=0{}other{{sec} }}{}</h{lvl}>"#,
212+
let text = format!(r#"<h{lvl} id="{id}"><a
213+
href="\#{id}">{sec_len,plural,=0{}other{{sec} }}{}</a></h{lvl}>"#,
213214
s, lvl = level, id = id,
214215
sec_len = sec.len(), sec = sec);
215216

branches/snap-stage3/src/librustdoc/html/render.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,8 @@ fn item_module(w: &mut Writer, cx: &Context,
10641064
clean::ForeignStaticItem(..) => ("ffi-statics", "Foreign Statics"),
10651065
clean::MacroItem(..) => ("macros", "Macros"),
10661066
};
1067-
try!(write!(w, "<h2 id='{}'>{}</h2>\n<table>", short, name));
1067+
try!(write!(w, "<h2 id='{id}'><a href=\"\\#{id}\">{name}</a></h2>\n<table>",
1068+
id = short, name = name));
10681069
}
10691070

10701071
match myitem.inner {

branches/snap-stage3/src/librustdoc/html/static/main.css

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,16 @@ pre.rust .string { color: #718C00; }
320320
pre.rust .lifetime { color: #C13928; }
321321
pre.rust .attribute, pre.rust .attribute .ident { color: #C82829; }
322322

323-
h1 a.anchor,
324-
h2 a.anchor,
325-
h3 a.anchor { display: none; }
326-
h1:hover a.anchor,
327-
h2:hover a.anchor,
328-
h3:hover a.anchor { display: inline-block; }
323+
h1:hover a:after,
324+
h2:hover a:after,
325+
h3:hover a:after,
326+
h4:hover a:after,
327+
h5:hover a:after,
328+
h6:hover a:after {
329+
content: ' § ';
330+
}
331+
332+
h1.fqn:hover a:after,
333+
:hover a.fnname:after {
334+
content: none;
335+
}

branches/snap-stage3/src/librustdoc/html/static/main.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,4 @@
600600

601601
initSearch(searchIndex);
602602

603-
$.each($('h1, h2, h3'), function(idx, element) {
604-
if ($(element).attr('id') != undefined) {
605-
$(element).append('<a href="#' + $(element).attr('id') + '" ' +
606-
'class="anchor"> § </a>');
607-
}
608-
});
609603
}());

0 commit comments

Comments
 (0)