Merge pull request #95 from uranusjr/unique-footnote

Only render first footnote reflink occurrence to avoid duplicate HTML IDs
This commit is contained in:
Devin Torres 2014-08-07 14:00:50 -05:00
commit e05c607bb4

View file

@ -1022,11 +1022,11 @@ char_link(hoedown_buffer *ob, hoedown_document *doc, uint8_t *data, size_t offse
goto cleanup; goto cleanup;
fr->is_used = 1; fr->is_used = 1;
fr->num = doc->footnotes_used.count; fr->num = doc->footnotes_used.count;
}
/* render */ /* render */
if (fr && doc->md.footnote_ref) if (doc->md.footnote_ref)
ret = doc->md.footnote_ref(ob, fr->num, doc->md.opaque); ret = doc->md.footnote_ref(ob, fr->num, doc->md.opaque);
}
goto cleanup; goto cleanup;
} }