From da230412574daa9697b4cef24c7be6209b8884dc Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 26 Jun 2019 23:35:07 +0200 Subject: fix extra newlines when copying from diff in Firefox (#7288) * fix extra newlines when copying from diff See https://bugzilla.mozilla.org/show_bug.cgi?id=1273836 Basically, the
 seems to add a forced newline that is not
possible to get rid of via CSS, so I replaced it with just a .

Secondly, .lines-type-marker also forced a newline in the copied text,
but that was possible to get rid of via user-select.

Safari still has a extraneous newline in the copied text of unknown
origin, but this should not block stop this PR.

* simplify .line-type-marker

* fix selector

* remove erronous ^^^

* Fix empty split diff

* Fix arc-theme-green

* fix add comment

* ensure line-num is copied too

* Update templates/repo/diff/box.tmpl

Co-Authored-By: zeripath 

* attempt to fix safari via removing 

* remove useless whitespace at the end of 'class'

* remove inter-tag whitespace for code s

* more inter-tag removal

* final inter-tag removal

* attempt to fix empty line copy

* move and comment getLineContent

* fix golint

* make background grey for missing added code
---
 public/js/index.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'public/js')

diff --git a/public/js/index.js b/public/js/index.js
index 3b2527d986..53fcaa8ba1 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1069,8 +1069,8 @@ function initPullRequestReview() {
         var ntr = tr.next();
         if (!ntr.hasClass('add-comment')) {
             ntr = $(''
-                    + (isSplit ? ''
-                               : '')
+                    + (isSplit ? ''
+                               : '')
                     + '');
             tr.after(ntr);
         }
-- 
cgit v1.2.3