Skip to content

Commit 1145371

Browse files
committed
rustdoc: Add stability and source links to the methods. Fixes #12932.
this change made most functions that render the methods to require the render `Context`, so they are now made into `Context` methods.
1 parent b2a8fae commit 1145371

File tree

3 files changed

+622
-606
lines changed

3 files changed

+622
-606
lines changed

src/librustdoc/html/markdown.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +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}" class='section-link'><a
213-
href="\#{id}">{sec_len,plural,=0{}other{{sec} }}{}</a></h{lvl}>"#,
212+
let text = format!("<h{lvl} id=\"{id}\"><a href=\"\\#{id}\" class='section-link'>\
213+
{sec_len,plural,=0{}other{{sec} }}{}</a></h{lvl}>",
214214
s, lvl = level, id = id,
215215
sec_len = sec.len(), sec = sec);
216216

0 commit comments

Comments
 (0)