Merge branch '19086-double-newline' into 'master'
Fix Double Spaced CI Log Closes #19086 See merge request !8349
This commit is contained in:
commit
6c62482144
3 changed files with 13 additions and 1 deletions
4
changelogs/unreleased/19086-double-newline.yml
Normal file
4
changelogs/unreleased/19086-double-newline.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Fix double spaced CI log
|
||||
merge_request: 8349
|
||||
author: Jared Deckard <jared.deckard@gmail.com>
|
|
@ -105,7 +105,7 @@ module Ci
|
|||
break
|
||||
elsif s.scan(/</)
|
||||
@out << '<'
|
||||
elsif s.scan(/\n/)
|
||||
elsif s.scan(/\r?\n/)
|
||||
@out << '<br>'
|
||||
else
|
||||
@out << s.scan(/./m)
|
||||
|
|
|
@ -136,6 +136,14 @@ describe Ci::Ansi2html, lib: true do
|
|||
expect(subject.convert("<")[:html]).to eq('<')
|
||||
end
|
||||
|
||||
it "replaces newlines with line break tags" do
|
||||
expect(subject.convert("\n")[:html]).to eq('<br>')
|
||||
end
|
||||
|
||||
it "groups carriage returns with newlines" do
|
||||
expect(subject.convert("\r\n")[:html]).to eq('<br>')
|
||||
end
|
||||
|
||||
describe "incremental update" do
|
||||
shared_examples 'stateable converter' do
|
||||
let(:pass1) { subject.convert(pre_text) }
|
||||
|
|
Loading…
Reference in a new issue