2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-03-27 20:21:48 +00:00

Cookie setting enabled for 'git editor'

This commit is contained in:
2024-12-27 20:23:04 +00:00
parent dccd465354
commit 60d24dc48e
2 changed files with 18 additions and 12 deletions

View File

@@ -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):