]> git.cworth.org Git - turbot/commitdiff
Tweak bolding of hunt lead-in line from search results
authorCarl Worth <cworth@cworth.org>
Tue, 5 Jan 2021 18:39:49 +0000 (10:39 -0800)
committerCarl Worth <cworth@cworth.org>
Tue, 5 Jan 2021 18:39:49 +0000 (10:39 -0800)
Using bold just for the puzzle status word. (This is an attempt to
avoid Slack seeing a '*' in a regular expression of a search term and
think that it means to make something bold.)

turbot/hunt.py

index d25c803ab705c423a3eae448d801110070b011a1..f57e7565f5998a55a207dbf617422735491db4af 100644 (file)
@@ -86,7 +86,7 @@ def hunt_blocks(turb, hunt, puzzle_status='unsolved', search_terms=[]):
         for round in puzzle['rounds']:
             rounds.add(round)
 
-    hunt_text = "*{} puzzles in hunt <{}|{}>".format(
+    hunt_text = "*{}* puzzles in hunt <{}|{}>".format(
         puzzle_status.capitalize(),
         channel_url(channel_id),
         name
@@ -94,7 +94,6 @@ def hunt_blocks(turb, hunt, puzzle_status='unsolved', search_terms=[]):
     if search_terms:
         quoted_terms = [quote_if_has_space(term) for term in search_terms]
         hunt_text += " matching {}".format(" AND ".join(quoted_terms))
-    hunt_text += "*"
 
     blocks = [
         section_block(text_block(hunt_text)),