randydev commited on
Commit
8772d56
·
verified ·
1 Parent(s): 6304702

add font stylish

Browse files
Files changed (1) hide show
  1. helper_regex.py +7 -0
helper_regex.py CHANGED
@@ -9,6 +9,13 @@
9
 
10
  import re
11
 
 
 
 
 
 
 
 
12
  def is_blocked_markdown_code(message):
13
  pattern = r"(?:python|py|javascript|js|bash|sh|html|go|cpp|c|json)\n.*?"
14
  match = re.search(pattern, message, re.DOTALL | re.IGNORECASE)
 
9
 
10
  import re
11
 
12
+ def is_blocked_font_stylish(message):
13
+ STYLISH_FONT_REGEX = r"[^\u0000-\u007F\u00A0-\u00FF\u0100-\u017F]+"
14
+ if re.search(STYLISH_FONT_REGEX, message):
15
+ return True
16
+ else:
17
+ return False
18
+
19
  def is_blocked_markdown_code(message):
20
  pattern = r"(?:python|py|javascript|js|bash|sh|html|go|cpp|c|json)\n.*?"
21
  match = re.search(pattern, message, re.DOTALL | re.IGNORECASE)