"Spaceship operator" corruption in GitHub link unfurling
Describe the bug
When a link to a file in GitHub is unfurled into a code snippet, if that file includes Ruby's "spaceship operator" (<=>), it is corrupted.
To Reproduce Steps to reproduce the behavior:
- Visit https://github.com/sambostock/slack-unfurling-spaceship-operator-bug/blob/main/example.rb#L1 and note the file's contents
- In a Slack instance with the GitHub integration, send a message including the link above
- After the link is unfurled, notice the
<=>has been corrupted (into a link)
Expected behavior
<=> should be rendered the same as all the other code
Screenshots
| GitHub | ![]() | |
| Slack Desktop | ![]() | ![]() |
| Slack Mobile | ![]() | ![]() |
Desktop (please complete the following information):
- OS: macOS Ventura 13.0.1 (22A400)
- Slack: Version 4.29.149 5581973fc9076ce89148bd7f26d8b25b070d3bf8@1669945041 (App Store)
- Browser: Chrome, Version 108.0.5359.98 (Official Build) (arm64)
Smartphone (please complete the following information):
- Device: Google Pixel 6 Pro
- OS: Android 13
- Slack: 22.12.10.0-90012019-11629
Additional context
Not sure if this is a bug in the GitHub Slack integration, or if it's a bug in Slack itself. My guess is the GitHub integration, as Slack code blocks and snippets don't have this issue. Nonetheless, I've also reported this to Slack directly.
Slack support confirmed this is a bug in the GitHub integration.
@nikhilgarg1047 Can you get someone to look into this issue.
Thank you for bringing this to our attention, we are looking into it
Hi, are you still looking into it? This appears to still happen.
Note that it's not just the "spaceship operator" that's impacted but anything with "<" and ">" and something in between, such as Rust's generic types and presumably C++ templates as well.
Rust examples:
Vec<u8>becomesVecu8HashMap<(Vec<u8>, Vec<u8>, bool), u64>becomesHashMap(Vec<u8, Vecu8, bool), u64>
Hey @sooda, I don't work at GitHub anymore so I cannot help fix this, sorry!




