diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-17 16:16:29 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-17 17:55:34 +0300 |
commit | 18f13e8bb8b63b28efb7c3b53a3143a068806225 (patch) | |
tree | a34ed657f25a660ef2d9df6ac84c35cfcb20c8c0 /app/views/projects/diffs | |
parent | d1da2e8180d92e5f4a8b5ebb36b0f4e4d0618bf8 (diff) |
Fix email line-height in Outlook
Outlook seems to handle `white-space: pre` weirdly, so just use `pre`
elements (but only for emails!).
Diffstat (limited to 'app/views/projects/diffs')
-rw-r--r-- | app/views/projects/diffs/_line.html.haml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/projects/diffs/_line.html.haml b/app/views/projects/diffs/_line.html.haml index 2d6a370b848..891b2bd9802 100644 --- a/app/views/projects/diffs/_line.html.haml +++ b/app/views/projects/diffs/_line.html.haml @@ -1,3 +1,4 @@ +- email = local_assigns.fetch(:email, false) - plain = local_assigns.fetch(:plain, false) - type = line.type - line_code = diff_file.line_code(line) unless plain @@ -22,4 +23,8 @@ = link_text - else %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) }= diff_line_content(line.text, type) + %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, type) + - else + = diff_line_content(line.text, type) |