mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	markdown: Add support for user group silent mention.
Prior to this, we only supported direct mention to the user groups. This commit extends that support to silent mention for the user groups. A related test case is also added. Fixes: #11711.
This commit is contained in:
		@@ -4,7 +4,7 @@ from typing import Match, Optional, Set, Tuple
 | 
			
		||||
# Match multi-word string between @** ** or match any one-word
 | 
			
		||||
# sequences after @
 | 
			
		||||
MENTIONS_RE = re.compile(r"(?<![^\s\'\"\(,:<])@(?P<silent>_?)(\*\*(?P<match>[^\*]+)\*\*)")
 | 
			
		||||
USER_GROUP_MENTIONS_RE = re.compile(r"(?<![^\s\'\"\(,:<])@(\*(?P<match>[^\*]+)\*)")
 | 
			
		||||
USER_GROUP_MENTIONS_RE = re.compile(r"(?<![^\s\'\"\(,:<])@(?P<silent>_?)(\*(?P<match>[^\*]+)\*)")
 | 
			
		||||
 | 
			
		||||
wildcards = ["all", "everyone", "stream"]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user