File tree Expand file tree Collapse file tree 4 files changed +17
-11
lines changed
tests/test_syntax/extensions Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ See the [Contributing Guide](contributing.md) for details.
1414
1515### Fixed
1616
17- * Fix an HTML comment parsing case in some Python versions that can cause an infinite loop (#1554 ).
17+ * Fix an HTML comment parsing case in some Python versions that can cause an
18+ infinite loop (#1554 ).
19+ * Revert the default behavior of ` USE_DEFINITION_ORDER ` (to ` True ` ). The new
20+ behavior introduced in 3.9.0 is experimental and results are inconsistent.
21+ It should not have been made the default behavior (#1561 ).
1822
1923## [ 3.9.0] - 2025-09-04
2024
Original file line number Diff line number Diff line change @@ -106,13 +106,12 @@ The following options are provided to configure the output:
106106 The text string used to set the footnote separator. Defaults to ` : ` .
107107
108108* ** ` USE_DEFINITION_ORDER ` ** :
109- Whether to order footnotes by the occurrence of footnote definitions
110- in the document. Defaults to ` False ` .
109+ Order footnotes by definition order ( ` True ` ) or by document order ( ` False ` ).
110+ Defaults to ` True ` .
111111
112- Introduced in version 3.9.0, this option allows footnotes to be ordered
113- by the occurrence of their definitions in the document, rather than by the
114- order of their references in the text. This was the behavior of
115- previous versions of the extension.
112+ The default behavior matches the behavior prior to this option being added.
113+ Disabling this option (setting to ` False ` ) is experimental and results may not
114+ be consistent.
116115
117116A trivial example:
118117
Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ def __init__(self, **kwargs):
6464 ':' , 'Footnote separator.'
6565 ],
6666 'USE_DEFINITION_ORDER' : [
67- False , 'Whether to order footnotes by footnote content rather than by footnote label.'
67+ True ,
68+ 'Order footnote labels by definition order (True) or by document order (False). '
69+ 'Default: True.'
6870 ]
6971 }
7072 """ Default configuration options. """
Original file line number Diff line number Diff line change @@ -337,8 +337,8 @@ def test_superscript_text(self):
337337 extension_configs = {'footnotes' : {'SUPERSCRIPT_TEXT' : '[{}]' }}
338338 )
339339
340- def test_footnote_order (self ):
341- """Test that footnotes occur in order of reference appearance."""
340+ def test_footnote_order_by_doc_order (self ):
341+ """Test that footnotes occur in order of reference appearance when so configured ."""
342342
343343 self .assertMarkdownRenders (
344344 self .dedent (
@@ -364,7 +364,8 @@ def test_footnote_order(self):
364364 'title="Jump back to footnote 2 in the text">↩</a></p>\n '
365365 '</li>\n '
366366 '</ol>\n '
367- '</div>'
367+ '</div>' ,
368+ extension_configs = {'footnotes' : {'USE_DEFINITION_ORDER' : False }}
368369 )
369370
370371 def test_footnote_order_tricky (self ):
You can’t perform that action at this time.
0 commit comments