]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/backend/wiki.py
wiki: Fix rendering issue if there has been no markup to render
[ipfire.org.git] / src / backend / wiki.py
index 59ae019cd2c58d7da66b4c764e6d4ebf086a959d..0320b7d6c90b3fc6715fd201c90bafd089e91d88 100644 (file)
@@ -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")