Don't use diff_line_content for emails

This commit is contained in:
Sean McGivern 2016-11-23 16:21:45 +00:00
parent 93f6fcc91e
commit 87a2762b8b
2 changed files with 2 additions and 4 deletions

View File

@ -51,11 +51,9 @@ module DiffHelper
html.html_safe
end
def diff_line_content(line, email: false)
def diff_line_content(line)
if line.blank?
" ".html_safe
elsif email
line.html_safe
else
line.sub(/^[\-+ ]/, '').html_safe
end

View File

@ -25,7 +25,7 @@
%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) }<
- if email
%pre= diff_line_content(line.text, email: true)
%pre= line.text
- else
= diff_line_content(line.text)