You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2022/02/09 16:20:28 UTC

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

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

brondsem pushed a commit to branch db/8408
in repository https://gitbox.apache.org/repos/asf/allura.git

commit c6c2969177eb190262335c0331c3700ff0194dc8
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)