Skip to content

Commit 1d13ae4

Browse files
committed
Minor fixes for work on footnotes extension
- Add changelog entry - Fix minor formatting issue
1 parent d7203c9 commit 1d13ae4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ and this project adheres to the
1010
[Python Version Specification](https://packaging.python.org/en/latest/specifications/version-specifiers/).
1111
See the [Contributing Guide](contributing.md) for details.
1212

13+
## [unreleased] - Unreleased
14+
15+
### Fixed
16+
17+
* Fix issue with footnote ordering (#1367).
18+
1319
## [3.8.2] - 2025-06-19
1420

1521
### Fixed

markdown/extensions/footnotes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ def makeFootnotesDiv(self, root: etree.Element) -> etree.Element | None:
224224
def reorderFootnoteDict(self) -> None:
225225
""" Reorder the footnotes dict based on the order of references found. """
226226
ordered_footnotes = OrderedDict()
227-
227+
228228
for ref in self.footnote_order:
229229
if ref in self.footnotes:
230230
ordered_footnotes[ref] = self.footnotes[ref]
231-
231+
232232
# Add back any footnotes that were defined but not referenced.
233233
for id, text in self.footnotes.items():
234234
if id not in ordered_footnotes:

0 commit comments

Comments
 (0)