-
Notifications
You must be signed in to change notification settings - Fork 881
Closed
Labels
docsRelated to the project documentation.Related to the project documentation.extensionRelated to one or more of the included extensions.Related to one or more of the included extensions.someday-maybeApproved low priority request.Approved low priority request.
Description
The numbering of footnotes follows the order in which the footnotes are defined rather than the order in which they are referenced in the document. This is somewhat surprising.
To reproduce:
#!/usr/bin/env python
import markdown
text = """
# Footnotes ordering
It seems that footnotes appear in the order in which they are
defined[^definedsecond] rather than in the order of their
occurrence[^definedfirst] in the text.
[^definedfirst]: blah
[^definedsecond]: blurb
"""
print(markdown.markdown(text, extensions=['footnotes']))
(Naively) expected behaviour: the footnotes are numbered 1 then 2 but they come out as 2 then 1.
I do realize that changing the behavior could break things, so perhaps documenting this would be the way to go?
Metadata
Metadata
Assignees
Labels
docsRelated to the project documentation.Related to the project documentation.extensionRelated to one or more of the included extensions.Related to one or more of the included extensions.someday-maybeApproved low priority request.Approved low priority request.