This PR closes #533 by making sure footnotes maintain their order of appearance in the final HTML.
Previously, the order of the final footnotes list was based on the insertion order of footnote_ids. This array was populated as the parser processed the text and encountered footnotes. The problem is that markdown isn't processed entirely in order, leading to a disorganised footnotes list being generated.
This PR changes this by instead using the insertion order of footnotes, which is populated at the beginning of the conversion process by _strip_footnote_definitions.
The result is that the generated list of footnotes will appear in the same order as the footnote definitions.
This PR closes #533 by making sure footnotes maintain their order of appearance in the final HTML.
Previously, the order of the final footnotes list was based on the insertion order of
footnote_ids
. This array was populated as the parser processed the text and encountered footnotes. The problem is that markdown isn't processed entirely in order, leading to a disorganised footnotes list being generated.This PR changes this by instead using the insertion order of
footnotes
, which is populated at the beginning of the conversion process by_strip_footnote_definitions
.The result is that the generated list of footnotes will appear in the same order as the footnote definitions.