mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Change important string constants from str to text_type. Replace str by text_type in annotations where relevant.
13 lines
357 B
Python
13 lines
357 B
Python
from __future__ import absolute_import
|
|
|
|
from six import text_type
|
|
# Match multi-word string between @** ** or match any one-word
|
|
# sequences after @
|
|
find_mentions = r'(?<![^\s\'\"\(,:<])@(?:\*\*([^\*]+)\*\*|(\w+))'
|
|
|
|
wildcards = ['all', 'everyone']
|
|
|
|
def user_mention_matches_wildcard(mention):
|
|
# type: (text_type) -> bool
|
|
return mention in wildcards
|