diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-17 14:16:29 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-17 15:55:34 +0100 |
commit | 18f13e8bb8b63b28efb7c3b53a3143a068806225 (patch) | |
tree | a34ed657f25a660ef2d9df6ac84c35cfcb20c8c0 /app/views/projects/diffs/_line.html.haml | |
parent | d1da2e8180d92e5f4a8b5ebb36b0f4e4d0618bf8 (diff) | |
download | gitlab-ce-18f13e8bb8b63b28efb7c3b53a3143a068806225.tar.gz |
Fix email line-height in Outlookoutlook-email-spacing
Outlook seems to handle `white-space: pre` weirdly, so just use `pre`
elements (but only for emails!).
Diffstat (limited to 'app/views/projects/diffs/_line.html.haml')
-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) |