fixed markdown extensions

This commit is contained in:
Yusur 2023-03-16 14:08:40 +01:00
parent 5f4370f953
commit 7f050afb8b
2 changed files with 2 additions and 3 deletions

2
app.py
View file

@ -97,7 +97,7 @@ def _makelist(l):
class StrikethroughExtension(markdown.extensions.Extension):
def extendMarkdown(self, md, md_globals=None):
postprocessor = StrikethroughPostprocessor(md)
md.postprocessors.add('strikethrough', postprocessor, '>raw_html')
md.postprocessors.register(postprocessor, 'strikethrough', 0)
class StrikethroughPostprocessor(markdown.postprocessors.Postprocessor):
pattern = re.compile(r"~~(((?!~~).)+)~~", re.DOTALL)