From 60d24dc48ed7a32752b2292e4e8670903fad8638 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 27 Dec 2024 20:23:04 +0000 Subject: Cookie setting enabled for 'git editor' --- core/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/utils.py') 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 " - + """Rewrites the supplied editor string intoa git-complient author string + Uses a regular expression for a git-compatible author string + valid example "John Doe " + """ 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): -- cgit v1.2.3