Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
87a2762b
Commit
87a2762b
authored
Nov 23, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use diff_line_content for emails
parent
93f6fcc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
app/helpers/diff_helper.rb
app/helpers/diff_helper.rb
+1
-3
app/views/projects/diffs/_line.html.haml
app/views/projects/diffs/_line.html.haml
+1
-1
No files found.
app/helpers/diff_helper.rb
View file @
87a2762b
...
@@ -51,11 +51,9 @@ module DiffHelper
...
@@ -51,11 +51,9 @@ module DiffHelper
html
.
html_safe
html
.
html_safe
end
end
def
diff_line_content
(
line
,
email:
false
)
def
diff_line_content
(
line
)
if
line
.
blank?
if
line
.
blank?
" "
.
html_safe
" "
.
html_safe
elsif
email
line
.
html_safe
else
else
line
.
sub
(
/^[\-+ ]/
,
''
).
html_safe
line
.
sub
(
/^[\-+ ]/
,
''
).
html_safe
end
end
...
...
app/views/projects/diffs/_line.html.haml
View file @
87a2762b
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
%a
{
href:
"##{line_code}"
,
data:
{
linenumber:
link_text
}}
%a
{
href:
"##{line_code}"
,
data:
{
linenumber:
link_text
}}
%td
.line_content.noteable_line
{
class:
type
,
data:
(
diff_view_line_data
(
line_code
,
diff_file
.
position
(
line
),
type
)
unless
plain
)
}
<
%td
.line_content.noteable_line
{
class:
type
,
data:
(
diff_view_line_data
(
line_code
,
diff_file
.
position
(
line
),
type
)
unless
plain
)
}
<
-
if
email
-
if
email
%pre
=
diff_line_content
(
line
.
text
,
email:
true
)
%pre
=
line
.
text
-
else
-
else
=
diff_line_content
(
line
.
text
)
=
diff_line_content
(
line
.
text
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment