integrations / slack

Bring your code to the conversations you care about with the GitHub and Slack integration
https://slack.github.com/
MIT License
2.99k stars 468 forks source link

Support link preview for permalinks with character selection #1718

Open raxityo opened 1 year ago

raxityo commented 1 year ago

Problem:

GitHub changes the permalink if a range of characters is selected.

For example:

  1. Open https://github.com/integrations/slack/blob/27299d5d03d159d42383031439a58afe351380e6/.github/settings.yml
  2. Select "repository" on Line 3
  3. Click on the options menu on line 3 and select "Copy Permalink"
  4. The copied link would look like this https://github.com/integrations/slack/blob/27299d5d03d159d42383031439a58afe351380e6/.github/settings.yml#LL3C1-L3C11
  5. Paste this in a Slack channel.
  6. Observe that the preview does show up for this line.
  7. Paste https://github.com/integrations/slack/blob/27299d5d03d159d42383031439a58afe351380e6/.github/settings.yml#L3
  8. Observe that the preview works as expected.

Describe the solution you'd like Pasting permalinks with character range selection format such as #LL3C1-L3C11 should preview the selected line. It would be ideal to somehow highlight the selected character range, but it's perhaps not feasible to implement in slack.

Describe alternatives you've considered None

Additional context None