diff --git a/changelogs/unreleased/63417-add-missing-class.yml b/changelogs/unreleased/63417-add-missing-class.yml new file mode 100644 index 0000000000000000000000000000000000000000..3030f5c57e43e6b9344674a6f87b8ceeb0984a63 --- /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 6109b45ffd2f364f43ebf36e2a5245cec55f6fe2..fc3223e7442ed1a5e4603e107a02a9a1b7b89b41 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 ac4612dda925bd99bdca07797293b6c04c1d5541..3d57ce431ab81016b93ca18cafc45c0ef24f9b58 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 = %{Hello} - line_break = %{
} + header = %{Hello} + line_break = %{
} line = %{} empty_line = %{} html = "#{section_start_html}#{header}#{line_break}#{line}#{empty_line}#{section_end_html}"