diff options
Diffstat (limited to 'core/utils.py')
-rw-r--r-- | core/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/utils.py b/core/utils.py index 6086b60..a251ba0 100644 --- a/core/utils.py +++ b/core/utils.py @@ -234,10 +234,10 @@ nothing to commit, working tree clean ) def git_string(author_string): - - # Regular expression for a git-compatible author string - # valid example "John Doe <john.doe@example.com>" - + """Rewrites the supplied editor string intoa git-complient author string + Uses a regular expression for a git-compatible author string + valid example "John Doe <john.doe@example.com>" + """ author_regex = re.compile(r'^[a-zA-Z][\w\s\_\.\-]* <[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-_]+\.[a-zA-Z]{2,}>$') if author_regex.match(author_string): |