summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-14 13:16:26 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-03-14 13:16:26 +0000
commit181c2582fbba4cdb276709b3f4920fab18e1e962 (patch)
treea28adb1cbb2c65f32274c9a187aa7227483b20f6 /app/views/projects
parent270e15f1538fe2b325dbb9bdcf58b622c2a4e86d (diff)
parent985af1a6707af531a242051e46a54c16dc31b9bc (diff)
downloadgitlab-ce-181c2582fbba4cdb276709b3f4920fab18e1e962.tar.gz
Merge branch 'nonewline-parser' into 'master'
Take nonewline context into account in diff parser Closes #28128 and #22636 See merge request !9705
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/diffs/_line.html.haml2
-rw-r--r--app/views/projects/diffs/_parallel_view.html.haml4
2 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 62135d3ae32..c09c7b87e24 100644
--- a/app/views/projects/diffs/_line.html.haml
+++ b/app/views/projects/diffs/_line.html.haml
@@ -9,7 +9,7 @@
- case type
- when 'match'
= diff_match_line line.old_pos, line.new_pos, text: line.text
- - when 'nonewline'
+ - when 'old-nonewline', 'new-nonewline'
%td.old_line.diff-line-num
%td.new_line.diff-line-num
%td.line_content.match= line.text
diff --git a/app/views/projects/diffs/_parallel_view.html.haml b/app/views/projects/diffs/_parallel_view.html.haml
index e7758c8bdfa..b7346f27ddb 100644
--- a/app/views/projects/diffs/_parallel_view.html.haml
+++ b/app/views/projects/diffs/_parallel_view.html.haml
@@ -12,7 +12,7 @@
- case left.type
- when 'match'
= diff_match_line left.old_pos, nil, text: left.text, view: :parallel
- - when 'nonewline'
+ - when 'old-nonewline', 'new-nonewline'
%td.old_line.diff-line-num
%td.line_content.match= left.text
- else
@@ -31,7 +31,7 @@
- case right.type
- when 'match'
= diff_match_line nil, right.new_pos, text: left.text, view: :parallel
- - when 'nonewline'
+ - when 'old-nonewline', 'new-nonewline'
%td.new_line.diff-line-num
%td.line_content.match= right.text
- else