Skip to content

Commit

Permalink
fix: Use 'written_footnote_ix' (index) in place of named tag in subse…
Browse files Browse the repository at this point in the history
…quent references
  • Loading branch information
smockle committed Jan 25, 2023
1 parent 1f30fbb commit 4cc5541
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/html.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static bool S_put_footnote_backref(cmark_html_renderer *renderer, cmark_strbuf *
renderer->written_footnote_ix = renderer->footnote_ix;
char m[32];
snprintf(m, sizeof(m), "%d", renderer->written_footnote_ix);

cmark_strbuf_puts(html, "<a href=\"#fnref-");
houdini_escape_href(html, node->as.literal.data, node->as.literal.len);
cmark_strbuf_puts(html, "\" class=\"footnote-backref\" data-footnote-backref aria-label=\"Back to reference ");
Expand All @@ -83,7 +83,7 @@ static bool S_put_footnote_backref(cmark_html_renderer *renderer, cmark_strbuf *
cmark_strbuf_puts(html, "-");
cmark_strbuf_puts(html, n);
cmark_strbuf_puts(html, "\" class=\"footnote-backref\" data-footnote-backref aria-label=\"Back to reference ");
houdini_escape_href(html, node->as.literal.data, node->as.literal.len);
cmark_strbuf_puts(html, m);
cmark_strbuf_puts(html, "-");
cmark_strbuf_puts(html, n);
cmark_strbuf_puts(html, "\">↩<sup class=\"footnote-ref\">");
Expand Down

0 comments on commit 4cc5541

Please sign in to comment.