Commit 18dfe0ce authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'emailsonpush-last-line' into 'master'

Fix final line in EmailsOnPush email diff being rendered as error.

Fixes https://github.com/gitlabhq/gitlabhq/issues/8976 and private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2194.

Pulls in gitlab_git 7.1.5, which includes https://gitlab.com/gitlab-org/gitlab_git/merge_requests/18.

See merge request !480
parents d21d5d2d cef0fe24
......@@ -62,6 +62,7 @@ v 7.10.0 (unreleased)
- Project labels are now available over the API under the "tag_list" field (Cristian Medina)
- Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz)
- Fix and improve help rendering (Sullivan Sénéchal)
- Fix final line in EmailsOnPush email diff being rendered as error.
v 7.9.2
......
......@@ -39,7 +39,7 @@ gem "browser"
# Extracting information from a git repository
# Provide access to Gitlab::Git library
gem "gitlab_git", '~> 7.1.3'
gem "gitlab_git", '~> 7.1.6'
# Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 2.0.0.rc2', require: 'grack'
......
......@@ -212,7 +212,7 @@ GEM
mime-types (~> 1.19)
gitlab_emoji (0.1.0)
gemojione (~> 2.0)
gitlab_git (7.1.3)
gitlab_git (7.1.6)
activesupport (~> 4.0)
charlock_holmes (~> 0.6)
gitlab-linguist (~> 3.0)
......@@ -703,7 +703,7 @@ DEPENDENCIES
gitlab-grack (~> 2.0.0.rc2)
gitlab-linguist (~> 3.0.1)
gitlab_emoji (~> 0.1)
gitlab_git (~> 7.1.3)
gitlab_git (~> 7.1.6)
gitlab_meta (= 7.0)
gitlab_omniauth-ldap (= 1.2.1)
gollum-lib (~> 4.0.2)
......
......@@ -33,12 +33,8 @@ module EmailsHelper
end
end
def add_email_highlight_css
Rugments::Themes::Github.render(scope: '.highlight')
end
def color_email_diff(diffcontent)
formatter = Rugments::Formatters::HTML.new(cssclass: 'highlight')
formatter = Rugments::Formatters::HTML.new(cssclass: "highlight", inline_theme: :github)
lexer = Rugments::Lexers::Diff.new
raw formatter.format(lexer.lex(diffcontent))
end
......
......@@ -27,8 +27,7 @@
}
.file-stats .deleted-file {
color: #B00;
}
#{add_email_highlight_css}
}}
%body
%div.content
= yield
......
......@@ -59,8 +59,7 @@
%strong
= diff.new_path
%hr
%pre
= color_email_diff(diff.diff)
= color_email_diff(diff.diff)
%br
- if @compare.timeout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment