From d60516420b2a449485fb4a96146cd2bf5d9e7824 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Thu, 23 Jul 2020 22:30:04 +1000 Subject: [PATCH] Fix bug with removal of footnotes in preview --- wikinote/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wikinote/__init__.py b/wikinote/__init__.py index aba5cf5..43c03f2 100644 --- a/wikinote/__init__.py +++ b/wikinote/__init__.py @@ -165,8 +165,10 @@ def page_preview(path): else: elem.text += child.tail elem.remove(child) - walk_tree(child) - last_child = child + walk_tree(child) + else: + walk_tree(child) + last_child = child walk_tree(page_root[0]) page_content = md.serialise(page_root)