diff options
author | Ben Kelly <bk@ancilla.ca> | 2017-07-22 10:55:54 -0400 |
---|---|---|
committer | Ben Kelly <btk@google.com> | 2017-07-22 10:56:23 -0400 |
commit | c667bf69033c7cf96fe6fd26e98c966d0803977a (patch) | |
tree | 4610f7b47e82fc2cae4b4def9950c3651448efe6 /wee_slack.py | |
parent | 0523eb9ca47b0d472f2981c700461ed78c576bff (diff) | |
download | wee-slack-c667bf69033c7cf96fe6fd26e98c966d0803977a.tar.gz |
Fix overzealous regex in unfurl_refs
Signed-off-by: Ben Kelly <btk@google.com>
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 4 |
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)) |