It would be great if when you copy and paste the diffs you wouldn't see the pluses in there. 99% of the time I am trying to copy code to test it somewhere.
Keep the + and - and remove the line numbers from the copy paste data.
I suggest using a data-line-number attribute for the number and in the css you can use :before with content: attr(data-line-number);.
This will make the line number unselectable. Via this awesome blog post https://davidwalsh.name/css-content-attr
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
Anyway. My approach was to directly edit the copied content using the new HTML5 JS clipboard APIs, to only get the content from the copied .line_content nodes, not the gutter. I think that makes more sense than moving the line numbers to data attributes.
We're gonna use the same approach of modifying the clipboard to allow copying a rendered comment and pasting it as Markdown.
@rspeicher you should still have my JS for removing the line numbers ;) I can't get at it right now.
@DouweM@rspeicher if this can be done using only CSS and HTML I think we should go for that route. Much simpler then modifying the users clipboard data.
@jschatz1 I'm worried that using only CSS/HTML will break the linking functionality. But if you can get that working with CSS-based line numbers I'm all for!
@jschatz1 Hah, forgive me any unintended offense :) I know, I was simply suggesting an alternative method that would not mess with the HTML. I agree we should try that first!