From 67be8d5884237689aeeaa63ad0819e64b6fdb2c5 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 19 Jan 2024 16:49:19 +0000 Subject: [PATCH] wiki: Fix rendering issue if there has been no markup to render It was impossible to delete pages. Signed-off-by: Michael Tremer --- src/backend/wiki.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/wiki.py b/src/backend/wiki.py index 59ae019c..0320b7d6 100644 --- a/src/backend/wiki.py +++ b/src/backend/wiki.py @@ -948,9 +948,12 @@ class LinkedFilesExtractor(markdown.treeprocessors.Treeprocessor): """ Finds all Linked Files """ - def run(self, root): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.md.files = [] + def run(self, root): # Find all images and store the URLs for image in root.findall(".//img"): src = image.get("src") -- 2.47.2