File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -932,3 +932,27 @@ def testCustomSubstitutions(self):
932
932
is the ‚mdash‘: \u2014
933
933
Must not be confused with ‚ndash‘ (\u2013 ) \u2026 ]</p>"""
934
934
self .assertEqual (self .md .convert (text ), correct )
935
+
936
+
937
+ class TestFootnotes (unittest .TestCase ):
938
+ """ Test Footnotes extension. """
939
+
940
+ def testBacklinkText (self ):
941
+ md = markdown .Markdown (
942
+ extensions = ['markdown.extensions.footnotes' ],
943
+ extension_configs = {'markdown.extensions.footnotes' : {'BACKLINK_TEXT' : 'back' }}
944
+ )
945
+ text = 'paragraph[^1]\n \n [^1]: A Footnote'
946
+ self .assertEqual (
947
+ md .convert (text ),
948
+ '<p>paragraph<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup></p>\n '
949
+ '<div class="footnote">\n '
950
+ '<hr />\n '
951
+ '<ol>\n '
952
+ '<li id="fn:1">\n '
953
+ '<p>A Footnote <a class="footnote-backref" href="#fnref:1" rev="footnote"'
954
+ ' title="Jump back to footnote 1 in the text">back</a></p>\n '
955
+ '</li>\n '
956
+ '</ol>\n '
957
+ '</div>'
958
+ )
You can’t perform that action at this time.
0 commit comments