markup icon indicating copy to clipboard operation
markup copied to clipboard

Unselectable diff markers for GH markdown?

Open vanvoorden opened this issue 6 months ago • 1 comments

https://github.com/orgs/community/discussions/157636

Select Topic Area

Product Feedback

Body

https://github.blog/changelog/2018-07-31-unselectable-diff-markers/

Years ago GH shipped unselectable diff markers. This means that if an engineer is viewing a diff in GH and choose to copy the diffed code their clipboard does not capture the + and - diff markers. Without this change an engineer would then have to go through their clipboard and manually remove the diff markers before pasting the code into an IDE and compiling.

The problem I see is this was never added to arbitrary code blocks in GH markdown:

- here is some code that was removed
+ here is some code that was added

A diff code block appearing in a GH issue or markdown document does not give me unselectable diff markers when attempting to copy.

Any ideas? Was this ever discussed before?

vanvoorden avatar Apr 25 '25 20:04 vanvoorden