Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

markdown: Replace deprecated UnescapePostprocessor.

Anders Kaseorgb91788b945b9
diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.py
index a265cef8585..3d463e10f86 100644
--- a/zerver/lib/markdown/__init__.py
+++ b/zerver/lib/markdown/__init__.py
@@ -2292,6 +2292,7 @@ class ZulipMarkdown(markdown.Markdown):
# We get priority 30 from 'hilite' extension
treeprocessors.register(markdown.treeprocessors.InlineProcessor(self), "inline", 25)
treeprocessors.register(markdown.treeprocessors.PrettifyTreeprocessor(self), "prettify", 20)
+ treeprocessors.register(markdown.treeprocessors.UnescapeTreeprocessor(self), "unescape", 18) # type: ignore[attr-defined] # https://github.com/python/typeshed/pull/9671
treeprocessors.register(
InlineInterestingLinkProcessor(self), "inline_interesting_links", 15
)
@@ -2306,7 +2307,6 @@ class ZulipMarkdown(markdown.Markdown):
postprocessors.register(
markdown.postprocessors.AndSubstitutePostprocessor(), "amp_substitute", 15
)
- postprocessors.register(markdown.postprocessors.UnescapePostprocessor(), "unescape", 10)
return postprocessors
def handle_zephyr_mirror(self) -> None: