From af09ba82e0cd1d5e04e203d3a2eb11cf7ee023dc Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Sat, 21 Oct 2017 15:00:26 -0500 Subject: [PATCH] change footnote anchor formats to fix spurious rendering differences --- src/librustdoc/html/markdown.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 80d1f0b01cc26..001e773098eb3 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -371,7 +371,7 @@ impl<'a, I: Iterator>> Iterator for Footnotes<'a, I> { match self.inner.next() { Some(Event::FootnoteReference(ref reference)) => { let entry = self.get_entry(&reference); - let reference = format!("{0}\ + let reference = format!("{0}\ ", (*entry).1); return Some(Event::Html(reference.into())); @@ -394,7 +394,7 @@ impl<'a, I: Iterator>> Iterator for Footnotes<'a, I> { v.sort_by(|a, b| a.1.cmp(&b.1)); let mut ret = String::from("

    "); for (mut content, id) in v { - write!(ret, "
  1. ", id).unwrap(); + write!(ret, "
  2. ", id).unwrap(); let mut is_paragraph = false; if let Some(&Event::End(Tag::Paragraph)) = content.last() { content.pop(); @@ -402,7 +402,7 @@ impl<'a, I: Iterator>> Iterator for Footnotes<'a, I> { } html::push_html(&mut ret, content.into_iter()); write!(ret, - " ", + " ", id).unwrap(); if is_paragraph { ret.push_str("

    ");