diff options
author | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-04-09 00:43:21 +0300 |
---|---|---|
committer | Annabel Dunstone <annabel.dunstone@gmail.com> | 2016-04-14 17:10:40 +0300 |
commit | 7030ffb0e09dbcc0d03d377846a04fe6cf7d20b6 (patch) | |
tree | 16ab8b091d7c315907cf06d9fbeb9920e28b82ea /app/views/projects/diffs | |
parent | 64776ab2b4ef40519e75eb73ae946d2c1f774aa6 (diff) |
Copying and pasting doesn't grab line numbers or +/-
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r-- | app/views/projects/diffs/_line.html.haml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/diffs/_line.html.haml b/app/views/projects/diffs/_line.html.haml index 9464c8dc996..2dc6f548437 100644 --- a/app/views/projects/diffs/_line.html.haml +++ b/app/views/projects/diffs/_line.html.haml @@ -9,12 +9,12 @@ %td.new_line.diff-line-num %td.line_content.match= line.text - else - %td.old_line.diff-line-num{class: type} + %td.old_line.diff-line-num{class: type, data: {linenumber: line.new_pos}} - link_text = raw(type == "new" ? " " : line.old_pos) - if defined?(plain) && plain = link_text - else - = link_to link_text, "##{line_code}", id: line_code + = link_to "", "##{line_code}", id: line_code, data: { linenumber: link_text } - if @comments_allowed && can?(current_user, :create_note, @project) = link_to_new_diff_note(line_code) %td.new_line.diff-line-num{class: type, data: {linenumber: line.new_pos}} @@ -22,5 +22,5 @@ - if defined?(plain) && plain = link_text - else - = link_to link_text, "##{line_code}", id: line_code + = link_to "", "##{line_code}", id: line_code, data: { linenumber: link_text } %td.line_content{class: "noteable_line #{type} #{line_code}", data: { line_code: line_code }}= diff_line_content(line.text) |