Merge pull request #2201 from jberry-suse/osclib-comments-command-find-allow-seperators

osclib/comments: command_find(): allow seperators after user.
This commit is contained in:
Jimmy Berry 2019-09-05 14:14:31 -05:00 committed by GitHub
commit 783a067423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ class CommentAPI(object):
Usage (in comment):
@<user> <command> [args...]
"""
command_re = re.compile(r'^@(?P<user>[^ ]+) (?P<args>.*)$', re.MULTILINE)
command_re = re.compile(r'^@(?P<user>[^ ,:]+)[,:]? (?P<args>.*)$', re.MULTILINE)
# Search for commands in the order the comment was created.
for comment in sorted(comments.values(), key=lambda c: c['when']):