@@ -535,12 +535,12 @@ def check_syntax(self, cmd, line):
535535 if parts [0 ] == "begin" and len (parts ) > 1 :
536536 return "The 'begin' label takes no additional arguments, should be verbatim '> begin'"
537537 elif parts [0 ] == "topic" :
538- match = re .match (RE .name_syntax , line )
539- if match :
538+ search = re .search (RE .name_syntax , line )
539+ if search :
540540 return "Topics should be lowercased and contain only numbers and letters"
541541 elif parts [0 ] == "object" :
542- match = re .match (RE .name_syntax , line )
543- if match :
542+ search = re .search (RE .obj_syntax , line ) # Upper case is allowed
543+ if search :
544544 return "Objects can only contain numbers and letters"
545545 elif cmd == '+' or cmd == '%' or cmd == '@' :
546546 # + Trigger, % Previous, @ Redirect
@@ -585,12 +585,12 @@ def check_syntax(self, cmd, line):
585585
586586 # In UTF-8 mode, most symbols are allowed.
587587 if self .utf8 :
588- match = re .match (RE .utf8_trig , line )
589- if match :
588+ search = re .search (RE .utf8_trig , line )
589+ if search :
590590 return "Triggers can't contain uppercase letters, backslashes or dots in UTF-8 mode."
591591 else :
592- match = re .match (RE .trig_syntax , line )
593- if match :
592+ search = re .search (RE .trig_syntax , line )
593+ if search :
594594 return "Triggers may only contain lowercase letters, numbers, and these symbols: ( | ) [ ] * _ # @ { } < > ="
595595 elif cmd == '-' or cmd == '^' or cmd == '/' :
596596 # - Trigger, ^ Continue, / Comment
0 commit comments