diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2024-12-27 20:23:04 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2024-12-27 20:23:04 +0000 |
commit | 60d24dc48ed7a32752b2292e4e8670903fad8638 (patch) | |
tree | 598c17039cbdecd988427980a60b38bfbcde11d0 /core/utils.py | |
parent | dccd46535468d01af325c4e17f0e190c6404b037 (diff) | |
download | troggle-60d24dc48ed7a32752b2292e4e8670903fad8638.tar.gz troggle-60d24dc48ed7a32752b2292e4e8670903fad8638.tar.bz2 troggle-60d24dc48ed7a32752b2292e4e8670903fad8638.zip |
Cookie setting enabled for 'git editor'
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): |