change footnote anchor formats to fix spurious rendering differences
This commit is contained in:
parent
4fdd6299b0
commit
af09ba82e0
1 changed files with 3 additions and 3 deletions
|
|
@ -371,7 +371,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for Footnotes<'a, I> {
|
|||
match self.inner.next() {
|
||||
Some(Event::FootnoteReference(ref reference)) => {
|
||||
let entry = self.get_entry(&reference);
|
||||
let reference = format!("<sup id=\"supref{0}\"><a href=\"#ref{0}\">{0}\
|
||||
let reference = format!("<sup id=\"fnref{0}\"><a href=\"#fn{0}\">{0}\
|
||||
</a></sup>",
|
||||
(*entry).1);
|
||||
return Some(Event::Html(reference.into()));
|
||||
|
|
@ -394,7 +394,7 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for Footnotes<'a, I> {
|
|||
v.sort_by(|a, b| a.1.cmp(&b.1));
|
||||
let mut ret = String::from("<div class=\"footnotes\"><hr><ol>");
|
||||
for (mut content, id) in v {
|
||||
write!(ret, "<li id=\"ref{}\">", id).unwrap();
|
||||
write!(ret, "<li id=\"fn{}\">", 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<Item = Event<'a>>> Iterator for Footnotes<'a, I> {
|
|||
}
|
||||
html::push_html(&mut ret, content.into_iter());
|
||||
write!(ret,
|
||||
" <a href=\"#supref{}\" rev=\"footnote\">↩</a>",
|
||||
" <a href=\"#fnref{}\" rev=\"footnote\">↩</a>",
|
||||
id).unwrap();
|
||||
if is_paragraph {
|
||||
ret.push_str("</p>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue