Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion markdown/extensions/footnotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def finder(element):
if child.tail:
if child.tail.find(self.getConfig("PLACE_MARKER")) > -1:
return child, element, False
finder(child)
child_res = finder(child)
if child_res is not None:
return child_res
return None

res = finder(root)
Expand Down
13 changes: 13 additions & 0 deletions tests/extensions/extra/footnote_placeholder_depth.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<blockquote>
<blockquote>
<div class="footnote">
<hr />
<ol>
<li id="fn:1">
<p>A Footnote.&#160;<a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p>
</li>
</ol>
</div>
<p>Some text with a footnote<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup>.</p>
</blockquote>
</blockquote>
5 changes: 5 additions & 0 deletions tests/extensions/extra/footnote_placeholder_depth.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
>> ///Footnotes Go Here///
>>
>> Some text with a footnote[^1].

[^1]: A Footnote.