Populate render context for footnote references.

This commit is contained in:
Tom Alexander
2023-10-29 12:53:28 -04:00
parent 795945f0da
commit cd27869122
3 changed files with 42 additions and 6 deletions

View File

@@ -42,7 +42,7 @@ impl<'intermediate, 'parse> Registry<'intermediate, 'parse> {
// If it has no label then it must always get a new ID.
self.footnote_ids
.push((None, FootnoteDefinitionContents::FromReference(definition)));
return self.footnote_ids.len();
return self.footnote_ids.len() - 1;
}
if let Some(existing_id) = self
@@ -61,7 +61,7 @@ impl<'intermediate, 'parse> Registry<'intermediate, 'parse> {
} else {
self.footnote_ids
.push((label, FootnoteDefinitionContents::FromReference(definition)));
self.footnote_ids.len()
self.footnote_ids.len() - 1
}
}