diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-06-17 17:21:27 +0300 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-06-17 17:21:27 +0300 |
commit | cd6fc8b81fc18d438fb696862b6cd7a05ae7b1d5 (patch) | |
tree | 650d6f6a7c52a5d3651e6ae6e96a3ee1422f1f5f /lib/gitlab/ci/ansi2html.rb | |
parent | ad9079da5a397606aa5588731b5402117a3806bb (diff) |
Compact syntax for default class names
Diffstat (limited to 'lib/gitlab/ci/ansi2html.rb')
-rw-r--r-- | lib/gitlab/ci/ansi2html.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gitlab/ci/ansi2html.rb b/lib/gitlab/ci/ansi2html.rb index dafa0087f3f..d20ed207b3f 100644 --- a/lib/gitlab/ci/ansi2html.rb +++ b/lib/gitlab/ci/ansi2html.rb @@ -197,9 +197,7 @@ module Gitlab css_classes = [] if @sections.any? - css_classes << "section" - css_classes += sections.map { |section| "s_#{section}" } - css_classes << "line" + css_classes = %w[section line] + sections.map { |section| "s_#{section}" } end write_in_tag %{<br/>} @@ -217,13 +215,13 @@ module Gitlab normalized_section = section_to_class_name(section) if action == "start" - handle_section_start(normalized_section, timestamp, line) + handle_section_start(normalized_section, timestamp) elsif action == "end" handle_section_end(normalized_section, timestamp) end end - def handle_section_start(section, timestamp, line) + def handle_section_start(section, timestamp) return if @sections.include?(section) @sections << section |