File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
tests/test_syntax/extensions Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,34 @@ def test_footnote_order(self):
361
361
'</div>'
362
362
)
363
363
364
+ def test_footnote_order_tricky (self ):
365
+ """Test that tricky sequence of footnote references."""
366
+
367
+ self .assertMarkdownRenders (
368
+ '`Footnote reference in code spans should be ignored[^tricky]`. '
369
+ 'A footnote reference[^ordinary]. '
370
+ 'Another footnote reference[^tricky].\n \n '
371
+ '[^ordinary]: This should be the first footnote.\n '
372
+ '[^tricky]: This should be the second footnote.' ,
373
+ '<p><code>Footnote reference in code spans should be ignored[^tricky]</code>. '
374
+ 'A footnote reference<sup id="fnref:ordinary"><a class="footnote-ref" '
375
+ 'href="#fn:ordinary">1</a></sup>. Another footnote reference<sup id="fnref:tricky">'
376
+ '<a class="footnote-ref" href="#fn:tricky">2</a></sup>.</p>\n '
377
+ '<div class="footnote">\n '
378
+ '<hr />\n '
379
+ '<ol>\n '
380
+ '<li id="fn:ordinary">\n '
381
+ '<p>This should be the first footnote. <a class="footnote-backref" '
382
+ 'href="#fnref:ordinary" title="Jump back to footnote 1 in the text">↩</a></p>\n '
383
+ '</li>\n '
384
+ '<li id="fn:tricky">\n '
385
+ '<p>This should be the second footnote. <a class="footnote-backref" '
386
+ 'href="#fnref:tricky" title="Jump back to footnote 2 in the text">↩</a></p>\n '
387
+ '</li>\n '
388
+ '</ol>\n '
389
+ '</div>'
390
+ )
391
+
364
392
def test_footnote_reference_within_code_span (self ):
365
393
"""Test footnote reference within a code span."""
366
394
You can’t perform that action at this time.
0 commit comments