diff options
-rw-r--r-- | _pytest/test_unfurl.py | 5 | ||||
-rw-r--r-- | wee_slack.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/_pytest/test_unfurl.py b/_pytest/test_unfurl.py index b76e5f6..480000e 100644 --- a/_pytest/test_unfurl.py +++ b/_pytest/test_unfurl.py @@ -104,6 +104,11 @@ import wee_slack 'auto_link_display': 'both', }, { + 'input': "url with equal fallback: <https://example.com|https://example.com> suffix", + 'output': "url with equal fallback: https://example.com suffix", + 'auto_link_display': 'both', + }, + { 'input': "try the #general channel", 'output': "try the #general channel", }, 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("@"): |