fixed markdown extensions
This commit is contained in:
parent
5f4370f953
commit
7f050afb8b
2 changed files with 2 additions and 3 deletions
2
app.py
2
app.py
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue