summaryrefslogtreecommitdiffstats
path: root/core/utils.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2024-12-28 23:49:26 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2024-12-28 23:49:26 +0000
commitdac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb (patch)
tree8a6f48048fdd5939b940e5d4d09b3051ae2fea07 /core/utils.py
parente7444d20a4759cc3b1a9232c5129499ba5e1abfc (diff)
downloadtroggle-dac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb.tar.gz
troggle-dac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb.tar.bz2
troggle-dac3e6e2889b1d194069c1b8d1eb98fea6d1f7eb.zip
Entrances now do cookie / git author thing. + tidyup.
Diffstat (limited to 'core/utils.py')
-rw-r--r--core/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/utils.py b/core/utils.py
index 5ba1b4b..26d88c6 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -218,7 +218,9 @@ def git_string(author_string):
return author_string
else:
editor = author_string.replace("@","_at_")
- editor = re.sub('[^0-9a-zA-Z_\.]+', '*', editor)
+ editor = re.sub('[^0-9a-zA-Z_\.]+', '_', editor)
+ if editor.startswith("_"):
+ editor = "X" + editor
editor += f" <{editor}@potatohut.expo>"
print(f"++ Not git-compatible author string '{author_string}', replacing as '{editor}'")
return editor