From 4bca55ecc12eb56357e5a5279fece0adced30430 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 9 Jan 2021 14:37:10 -0800 Subject: [PATCH] Allow tag values to have numbers There was unanimous consent that this could be useful, and it's an easy change. --- TODO | 2 -- turbot/interaction.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index 3918152..d0aa1ba 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ Bugs that we want to fix before Hunt 2021 ----------------------------------------- -• Allow tags to have numbers - • Move sheets into a subfolder • Add "/hunt new" diff --git a/turbot/interaction.py b/turbot/interaction.py index ec64706..13b8ebf 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -927,8 +927,8 @@ def tag(turb, body, args): tag = tag.upper() # Reject a tag that is not alphabetic or underscore A-Z_ - if not re.match(r'^[A-Z_]*$', tag): - return bot_reply("Sorry, tags can only contain letters " + if not re.match(r'^[A-Z0-9_]*$', tag): + return bot_reply("Sorry, tags can only contain letters, numbers, " + "and the underscore character.") if action == 'remove': -- 2.43.0