diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-03-26 21:33:54 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-04-05 20:22:46 +0200 |
commit | 5dfba738a85d3065de0275ae3a0ed607d1fe3788 (patch) | |
tree | fcf708fe6e2290c7ec59e3085aaf1d66e53604aa /wee_slack.py | |
parent | 2fe22630c27bde3d185f4f6c663b16d1ce2910ac (diff) | |
download | wee-slack-5dfba738a85d3065de0275ae3a0ed607d1fe3788.tar.gz |
Ignore ref fallback if it's equal to the ref
Prevents showing "http://some.url (http://some.url)" if the url has a
fallback which is equal to the url.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 86b6018..9dd7d3a 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3395,7 +3395,7 @@ def unfurl_refs(text): if resolved_ref != ref: return resolved_ref - if fallback and not config.unfurl_ignore_alt_text: + if fallback and fallback != ref and not config.unfurl_ignore_alt_text: if ref.startswith("#"): return "#{}".format(fallback) elif ref.startswith("@"): |