You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2022/02/11 17:36:43 UTC

[allura] 06/12: [#8408] all markdown extensions need to register themselves

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit a2db7464a5c09a2795343d862e3f8cbd486a2ac6
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Fri Jan 14 15:57:12 2022 -0500

    [#8408] all markdown extensions need to register themselves
---
 Allura/allura/lib/markdown_extensions.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index 074ac48..cfef8e7 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -280,6 +280,7 @@ class EmojiExtension(markdown.Extension):
     EMOJI_RE = r'(:[a-zA-Z0-9\+\-_&.ô’Åéãíç()!#\*]+:)'
 
     def extendMarkdown(self, md):
+        md.registerExtension(self)
         md.inlinePatterns["emoji"] = EmojiInlinePattern(self.EMOJI_RE)
 
 
@@ -295,6 +296,7 @@ class UserMentionExtension(markdown.Extension):
     UM_RE = r'\B(@(?![0-9]+$)(?!-)[a-z0-9_-]{2,14}[a-z0-9_])'
 
     def extendMarkdown(self, md):
+        md.registerExtension(self)
         md.inlinePatterns["user_mentions"] = UserMentionInlinePattern(self.UM_RE)