mirror of
https://github.com/go-gitea/gitea
synced 2025-08-06 17:48:19 +00:00
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 <pre><code> seems to add a forced newline that is not possible to get rid of via CSS, so I replaced it with just a <code>. 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 <art27@cantab.net> * attempt to fix safari via removing <code> * remove useless whitespace at the end of 'class' * remove inter-tag whitespace for code <td>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
This commit is contained in:
@@ -1115,12 +1115,15 @@ a.ui.labels .label:hover {
|
||||
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(1),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(2),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(3),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(4) {
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(4),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(5),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(6) {
|
||||
background-color: #2a2e3a;
|
||||
}
|
||||
|
||||
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(3),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(4),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(5),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(6),
|
||||
.repository .diff-file-box .code-diff-split tbody tr td.add-code {
|
||||
background-color: #283e2d !important;
|
||||
border-color: #314a37 !important;
|
||||
@@ -1128,6 +1131,7 @@ a.ui.labels .label:hover {
|
||||
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(1),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(2),
|
||||
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(3),
|
||||
.repository .diff-file-box .code-diff-split tbody tr td.del-code {
|
||||
background-color: #3c2626 !important;
|
||||
border-color: #634343 !important;
|
||||
|
Reference in New Issue
Block a user