aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-03-26 21:33:54 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2020-04-05 20:22:46 +0200
commit5dfba738a85d3065de0275ae3a0ed607d1fe3788 (patch)
treefcf708fe6e2290c7ec59e3085aaf1d66e53604aa /wee_slack.py
parent2fe22630c27bde3d185f4f6c663b16d1ce2910ac (diff)
downloadwee-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.py2
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("@"):