]> git.cworth.org Git - turbot/commitdiff
Allow tag values to have numbers
authorCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2021 22:37:10 +0000 (14:37 -0800)
committerCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2021 22:37:10 +0000 (14:37 -0800)
There was unanimous consent that this could be useful, and it's an
easy change.

TODO
turbot/interaction.py

diff --git a/TODO b/TODO
index 391815289c7cf0ae9b39664fbc05df50c4de5f97..d0aa1ba256903cecaa79d91ac14643eb12fc4d61 100644 (file)
--- 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"
index ec64706658f3126bfc1974921d12e4cdece78ffe..13b8ebf00fd6a31ceb60757b076ff86f30421dcd 100644 (file)
@@ -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':