aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Kelly <bk@ancilla.ca>2017-07-22 10:55:54 -0400
committerBen Kelly <btk@google.com>2017-07-22 10:56:23 -0400
commitc667bf69033c7cf96fe6fd26e98c966d0803977a (patch)
tree4610f7b47e82fc2cae4b4def9950c3651448efe6
parent0523eb9ca47b0d472f2981c700461ed78c576bff (diff)
downloadwee-slack-c667bf69033c7cf96fe6fd26e98c966d0803977a.tar.gz
Fix overzealous regex in unfurl_refs
Signed-off-by: Ben Kelly <btk@google.com>
-rw-r--r--wee_slack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 0da53f0..7b55d81 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2110,7 +2110,7 @@ def handle_imopen(im_json, eventrouter, **kwargs):
im = team.channels[request_metadata.channel_identifier]
unread_count_display = im_json['channel']['unread_count_display']
im.set_unread_count_display(unread_count_display)
-
+
def handle_groupshistory(message_json, eventrouter, **kwargs):
handle_history(message_json, eventrouter, **kwargs)
@@ -2558,7 +2558,7 @@ def unfurl_refs(text, ignore_alt_text=False):
# - <#C2147483705|#otherchannel>
# - <@U2147483697|@othernick>
# Test patterns lives in ./_pytest/test_unfurl.py
- matches = re.findall(r"(<[@#]?(?:[^<]*)>)", text)
+ matches = re.findall(r"(<[@#]?(?:[^>]*)>)", text)
for m in matches:
# Replace them with human readable strings
text = text.replace(m, unfurl_ref(m[1:-1], ignore_alt_text))