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 2021/08/24 15:38:59 UTC

[allura] 01/02: underscores in user's mentions parse correctly

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

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

commit a38a82e41de46649193072c3dd0bb8609cd11f05
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Fri Aug 20 09:19:56 2021 -0600

    underscores in user's mentions parse correctly
---
 Allura/allura/lib/markdown_extensions.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py
index c2050f7..ba36796 100644
--- a/Allura/allura/lib/markdown_extensions.py
+++ b/Allura/allura/lib/markdown_extensions.py
@@ -298,7 +298,7 @@ class EmojiInlinePattern(markdown.inlinepatterns.Pattern):
 
 class UserMentionExtension(markdown.Extension):
 
-    UM_RE = r'\B(@(?![0-9]+$)(?!-)[a-z0-9-]{2,14}[a-z0-9])'
+    UM_RE = r'\B(@(?![0-9]+$)(?!-)[a-z0-9_-]{2,14}[a-z0-9_])'
 
     def __init__(self, **kwargs):
         markdown.Extension.__init__(self)