From c1b327ca059831698b0bb34d63729b25f1ce0df6 Mon Sep 17 00:00:00 2001 From: imcompiling Date: Fri, 21 Mar 2025 13:56:28 -0400 Subject: [PATCH] Change regex to strip a 10th place 0 only. --- agon/cogs/commands/submission.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agon/cogs/commands/submission.py b/agon/cogs/commands/submission.py index 24f3ad3..8478ca2 100644 --- a/agon/cogs/commands/submission.py +++ b/agon/cogs/commands/submission.py @@ -208,9 +208,9 @@ class SubmissionCog(commands.Cog): elif re.search("^[0-9](\\.[0-9])?$", score): # need to add 0 in seconds and leading colon and 0 score = "0:0" + score - elif re.search("^[0]?[0-9]:[0-9]{2}(\\.[0-9])?$", score): + elif re.search("^[0][0-9]:[0-9]{2}(\\.[0-9])?$", score): # if there is a minute 10ths place 0, remove - score = score.lstrip("0") + score = score[1:] return score