aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2018-01-04 14:24:30 -0500
committerWaylan Limberg <waylan.limberg@icloud.com>2018-01-04 14:47:58 -0500
commitbbada79726d900ef9ae5410ab3a0ce573a742c00 (patch)
tree4d8f9ae5ee7fb8dbc7ae4d4fa96c4b102604c006 /markdown/extensions
parenta7d211b53afbdb3c3febf881127dfbea4da422ee (diff)
downloadmarkdown-bbada79726d900ef9ae5410ab3a0ce573a742c00.tar.gz
markdown-bbada79726d900ef9ae5410ab3a0ce573a742c00.tar.bz2
markdown-bbada79726d900ef9ae5410ab3a0ce573a742c00.zip
Avoid DeprecationWarnings for etree
Fixes #618.
Diffstat (limited to 'markdown/extensions')
-rw-r--r--markdown/extensions/footnotes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py
index 620cf0b..cdaf391 100644
--- a/markdown/extensions/footnotes.py
+++ b/markdown/extensions/footnotes.py
@@ -202,7 +202,7 @@ class FootnoteExtension(Extension):
)
backlink.text = FN_BACKLINK_TEXT
- if li.getchildren():
+ if len(li):
node = li[-1]
if node.tag == "p":
node.text = node.text + NBSP_PLACEHOLDER
@@ -393,7 +393,7 @@ class FootnoteTreeprocessor(Treeprocessor):
result = self.footnotes.findFootnotesPlaceholder(root)
if result:
child, parent, isText = result
- ind = parent.getchildren().index(child)
+ ind = list(parent).index(child)
if isText:
parent.remove(child)
parent.insert(ind, footnotesDiv)