From: Carl Worth Date: Sat, 9 Jan 2021 22:37:10 +0000 (-0800) Subject: Allow tag values to have numbers X-Git-Url: https://git.cworth.org/git?p=turbot;a=commitdiff_plain;h=4bca55ecc12eb56357e5a5279fece0adced30430 Allow tag values to have numbers There was unanimous consent that this could be useful, and it's an easy change. --- 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':