diff --git a/content_plugins/base.py b/content_plugins/base.py index e9204e8..154f203 100644 --- a/content_plugins/base.py +++ b/content_plugins/base.py @@ -254,11 +254,13 @@ class FootnoteBase(PrepareRichtextMixin, FilesystemTemplateRendererPlugin): class RichTextFootnoteMixin: + OO_FOOTNOTES = re.compile("((.*?))") MATCH_FOOTNOTES = re.compile("(\w+)") def get_prepared_richtext(self, richtext): # Find all footnotes and convert them into links richtext = super().get_prepared_richtext(richtext) + richtext = self.OO_FOOTNOTES.subn('\g<1>', richtext)[0] rv = self.MATCH_FOOTNOTES.subn( '\" class="footnote">\">\g<1>', richtext)[0]