aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdx_footnotes.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mdx_footnotes.py b/mdx_footnotes.py
index b9641ce..de79ed4 100644
--- a/mdx_footnotes.py
+++ b/mdx_footnotes.py
@@ -130,13 +130,13 @@ class FootnoteExtension (markdown.Extension):
if li.childNodes :
node = li.childNodes[-1]
if node.type == "text" :
- li.appendChild(backlink)
- elif node.nodeName == "p":
+ li.appendChild(backlink)
+ elif node.nodeName == "p":
node.appendChild(backlink)
- else:
- p = doc.createElement('p')
- p.appendChild(backlink)
- li.appendChild(p)
+ else:
+ p = doc.createElement('p')
+ p.appendChild(backlink)
+ li.appendChild(p)
ol.appendChild(li)