Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hegyi <ahegyi@gitlab.com>2019-06-19 08:48:19 +0300
committerAdam Hegyi <ahegyi@gitlab.com>2019-06-19 10:16:53 +0300
commit86c08225eb60a909701f9dfc6f767311cc2516c0 (patch)
treec5458097cb5e3354ada68bf5f36d263b9361316c /lib/gitlab/ci/ansi2html.rb
parent98a4a005d8d9eb4bf7e4b8fc601164055ced2199 (diff)
Fix copying a single line from Firefox
This change ensures that all open <span> tags are closed before adding a <br> tag.
Diffstat (limited to 'lib/gitlab/ci/ansi2html.rb')
-rw-r--r--lib/gitlab/ci/ansi2html.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/ci/ansi2html.rb b/lib/gitlab/ci/ansi2html.rb
index 6109b45ffd2..10d8c326c9a 100644
--- a/lib/gitlab/ci/ansi2html.rb
+++ b/lib/gitlab/ci/ansi2html.rb
@@ -200,7 +200,9 @@ module Gitlab
css_classes = %w[section line] + sections.map { |section| "s_#{section}" }
end
- write_in_tag %{<br/>}
+ ensure_open_new_tag
+ write_raw %{<br/>}
+ close_open_tags
write_raw %{<span class="#{css_classes.join(' ')}"></span>} if css_classes.any?
@lineno_in_section += 1
open_new_tag