Skip to content

Commit 7d84463

Browse files
committed
---
yaml --- r: 103579 b: refs/heads/auto c: 7a70ec1 h: refs/heads/master i: 103577: 617f3ec 103575: 7cddb16 v: v3
1 parent 2cd454f commit 7d84463

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: f22c96cc888eac4c1c5d44ea4765e5c2a65f64f3
16+
refs/heads/auto: 7a70ec1ba6e64949cab5edcad33b0d7538065884
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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/auto/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/auto/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)