From: Carl Worth Date: Tue, 5 Jan 2021 18:39:49 +0000 (-0800) Subject: Tweak bolding of hunt lead-in line from search results X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a1851eaee7e0f3312a370c9decbcc2e22ae214fa;p=turbot Tweak bolding of hunt lead-in line from search results 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.) --- diff --git a/turbot/hunt.py b/turbot/hunt.py index d25c803..f57e756 100644 --- a/turbot/hunt.py +++ b/turbot/hunt.py @@ -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)),