diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2017-09-17 22:14:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-17 22:14:35 +0200 |
commit | a4c4dd77c8568d4139fdace7866af2ac2a590f59 (patch) | |
tree | ef8da53a4aa73e183fdd4c2335d7890b040ca602 /wee_slack.py | |
parent | 5608e22cdeb9ba3a07e2925fc97bb47bcbbc17da (diff) | |
parent | 5395df24a05fbb7590249f8cbd5c77eee584889f (diff) | |
download | wee-slack-a4c4dd77c8568d4139fdace7866af2ac2a590f59.tar.gz |
Merge pull request #401 from ToxicFrog/toxicfrog/unfurl
Fix overzealous regex in unfurl_refs
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 3904ab0..be0558e 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2126,7 +2126,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) @@ -2581,7 +2581,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)) |