Skip to content

Commit

Permalink
Update markdownify template_tag per markdown changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
amywieliczka committed Apr 16, 2024
1 parent fff90f0 commit 0da7f31
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions exhibits/templatetags/markdown_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
# per notes in the release docs for version 2.5, used an EscapeHTML
# extension to replace safe_mode="escape" (deprecated)

# https://python-markdown.github.io/changelog/#safe_mode-and-html_replacement_text-keywords-deprecated
# https://python-markdown.github.io/changelog/#md_globals-keyword-deprecated-from-extension-api
# https://python-markdown.github.io/changelog/#previously-deprecated-objects-have-been-removed

class EscapeHtml(Extension):
def extendMarkdown(self, md, md_globals):
del md.preprocessors['html_block']
del md.inlinePatterns['html']
def extendMarkdown(self, md):
md.preprocessors.deregister('html_block')
md.inlinePatterns.deregister('html')

register = Library()

Expand Down

0 comments on commit 0da7f31

Please sign in to comment.