File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
tests/test_syntax/extensions Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -470,6 +470,45 @@ def test_footnote_reference_within_list(self):
470
470
'</div>'
471
471
)
472
472
473
+ def test_footnote_references_within_loose_list (self ):
474
+ """Test footnote reference within a list item."""
475
+
476
+ self .assertMarkdownRenders (
477
+ self .dedent (
478
+ '''
479
+ * Reference to [^first]
480
+
481
+ * Reference to [^second]
482
+
483
+ [^first]: First footnote definition
484
+ [^second]: Second footnote definition
485
+ '''
486
+ ),
487
+ self .dedent (
488
+ '''
489
+ <ul>
490
+ <li>
491
+ <p>Reference to <sup id="fnref:first"><a class="footnote-ref" href="#fn:first">1</a></sup></p>
492
+ </li>
493
+ <li>
494
+ <p>Reference to <sup id="fnref:second"><a class="footnote-ref" href="#fn:second">2</a></sup></p>
495
+ </li>
496
+ </ul>
497
+ <div class="footnote">
498
+ <hr />
499
+ <ol>
500
+ <li id="fn:first">
501
+ <p>First footnote definition <a class="footnote-backref" href="#fnref:first" title="Jump back to footnote 1 in the text">↩</a></p>
502
+ </li>
503
+ <li id="fn:second">
504
+ <p>Second footnote definition <a class="footnote-backref" href="#fnref:second" title="Jump back to footnote 2 in the text">↩</a></p>
505
+ </li>
506
+ </ol>
507
+ </div>
508
+ '''
509
+ )
510
+ )
511
+
473
512
def test_footnote_reference_within_html (self ):
474
513
"""Test footnote reference within HTML tags."""
475
514
You can’t perform that action at this time.
0 commit comments