Skip to content

Commit

Permalink
Fix regex for username mentions
Browse files Browse the repository at this point in the history
Signed-off-by: Mattia Verga <[email protected]>
  • Loading branch information
mattiaverga committed Nov 5, 2023
1 parent eb3c570 commit bf91f65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bodhi-server/bodhi/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


# This is a regular expression used to match username mentions in comments.
MENTION_RE = r'(?<!\S)(@\w+)'
MENTION_RE = r'(?<!\S)(@[\w-]+)'

log = python_logging.getLogger(__name__)

Expand Down
1 change: 1 addition & 0 deletions news/5453.bug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Usernames containing a `-` are now correctly matched when mentioning

0 comments on commit bf91f65

Please sign in to comment.