diff options
author | Rémy Coutable <remy@rymai.me> | 2016-05-18 21:20:46 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-05-18 21:20:46 +0300 |
commit | 5341b16fc92425d557a1c62d0329b276170eba73 (patch) | |
tree | 7b7088ce62dd1396f8dccda7f08311fd7cee0b41 /lib/gitlab | |
parent | 6daec9e6f1a83a2a38b791a24f39e8e4b539c873 (diff) |
Reuse existing SCSS variables
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/diff/inline_diff_marker.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/gitlab/diff/inline_diff_marker.rb b/lib/gitlab/diff/inline_diff_marker.rb index c9601d42d50..87a9b1e23ac 100644 --- a/lib/gitlab/diff/inline_diff_marker.rb +++ b/lib/gitlab/diff/inline_diff_marker.rb @@ -28,8 +28,18 @@ module Gitlab # Mark each range marker_ranges.each_with_index do |range, index| - before_content = markdown ? "{#{MARKDOWN_SYMBOLS[mode]}" : "<span class='#{html_class_names(marker_ranges, mode, index)}'>" - after_content = markdown ? "#{MARKDOWN_SYMBOLS[mode]}}" : "</span>" + before_content = + if markdown + "{#{MARKDOWN_SYMBOLS[mode]}" + else + "<span class='#{html_class_names(marker_ranges, mode, index)}'>" + end + after_content = + if markdown + "#{MARKDOWN_SYMBOLS[mode]}}" + else + "</span>" + end offset = insert_around_range(rich_line, range, before_content, after_content, offset) end |