summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-06-18 16:14:57 +0100
committerFilipa Lacerda <filipa@gitlab.com>2019-06-19 11:58:11 +0100
commitd3a1468b625c939d20862379a17fbc7d57c3e8aa (patch)
tree3596636a8502e6e17c85c20723ad9231d08b0be5
parentcd17f804d51751870f71e3bab57feeb9ab75da38 (diff)
downloadgitlab-ce-63417-add-missing-class.tar.gz
Adds missing class63417-add-missing-class
Will apply identation from CSS to collapsible sections
-rw-r--r--changelogs/unreleased/63417-add-missing-class.yml5
-rw-r--r--lib/gitlab/ci/ansi2html.rb2
-rw-r--r--spec/lib/gitlab/ci/ansi2html_spec.rb4
3 files changed, 8 insertions, 3 deletions
diff --git a/changelogs/unreleased/63417-add-missing-class.yml b/changelogs/unreleased/63417-add-missing-class.yml
new file mode 100644
index 00000000000..3030f5c57e4
--- /dev/null
+++ b/changelogs/unreleased/63417-add-missing-class.yml
@@ -0,0 +1,5 @@
+---
+title: Indent collapsible sections
+merge_request: 29804
+author:
+type: other
diff --git a/lib/gitlab/ci/ansi2html.rb b/lib/gitlab/ci/ansi2html.rb
index 6109b45ffd2..fc3223e7442 100644
--- a/lib/gitlab/ci/ansi2html.rb
+++ b/lib/gitlab/ci/ansi2html.rb
@@ -310,7 +310,7 @@ module Gitlab
if @sections.any?
css_classes << "section"
- css_classes << "js-section-header" if @lineno_in_section == 0
+ css_classes << "js-section-header section-header" if @lineno_in_section == 0
css_classes += sections.map { |section| "js-s-#{section}" }
end
diff --git a/spec/lib/gitlab/ci/ansi2html_spec.rb b/spec/lib/gitlab/ci/ansi2html_spec.rb
index ac4612dda92..3d57ce431ab 100644
--- a/spec/lib/gitlab/ci/ansi2html_spec.rb
+++ b/spec/lib/gitlab/ci/ansi2html_spec.rb
@@ -231,8 +231,8 @@ describe Gitlab::Ci::Ansi2html do
it 'prints light red' do
text = "#{section_start}\e[91mHello\e[0m\n#{section_end}"
- header = %{<span class="term-fg-l-red section js-section-header js-s-#{class_name(section_name)}">Hello</span>}
- line_break = %{<span class="section js-section-header js-s-#{class_name(section_name)}"><br/></span>}
+ header = %{<span class="term-fg-l-red section js-section-header section-header js-s-#{class_name(section_name)}">Hello</span>}
+ line_break = %{<span class="section js-section-header section-header js-s-#{class_name(section_name)}"><br/></span>}
line = %{<span class="section line s_#{class_name(section_name)}"></span>}
empty_line = %{<span class="section js-s-#{class_name(section_name)}"></span>}
html = "#{section_start_html}#{header}#{line_break}#{line}#{empty_line}#{section_end_html}"