Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
6c624821
Commit
6c624821
authored
Jan 09, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '19086-double-newline' into 'master'
Fix Double Spaced CI Log Closes #19086 See merge request !8349
parents
583deef2
76eec7ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
changelogs/unreleased/19086-double-newline.yml
changelogs/unreleased/19086-double-newline.yml
+4
-0
lib/ci/ansi2html.rb
lib/ci/ansi2html.rb
+1
-1
spec/lib/ci/ansi2html_spec.rb
spec/lib/ci/ansi2html_spec.rb
+8
-0
No files found.
changelogs/unreleased/19086-double-newline.yml
0 → 100644
View file @
6c624821
---
title
:
Fix double spaced CI log
merge_request
:
8349
author
:
Jared Deckard <jared.deckard@gmail.com>
lib/ci/ansi2html.rb
View file @
6c624821
...
@@ -105,7 +105,7 @@ module Ci
...
@@ -105,7 +105,7 @@ module Ci
break
break
elsif
s
.
scan
(
/</
)
elsif
s
.
scan
(
/</
)
@out
<<
'<'
@out
<<
'<'
elsif
s
.
scan
(
/\n/
)
elsif
s
.
scan
(
/\
r?\
n/
)
@out
<<
'<br>'
@out
<<
'<br>'
else
else
@out
<<
s
.
scan
(
/./m
)
@out
<<
s
.
scan
(
/./m
)
...
...
spec/lib/ci/ansi2html_spec.rb
View file @
6c624821
...
@@ -136,6 +136,14 @@ describe Ci::Ansi2html, lib: true do
...
@@ -136,6 +136,14 @@ describe Ci::Ansi2html, lib: true do
expect
(
subject
.
convert
(
"<"
)[
:html
]).
to
eq
(
'<'
)
expect
(
subject
.
convert
(
"<"
)[
:html
]).
to
eq
(
'<'
)
end
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
describe
"incremental update"
do
shared_examples
'stateable converter'
do
shared_examples
'stateable converter'
do
let
(
:pass1
)
{
subject
.
convert
(
pre_text
)
}
let
(
:pass1
)
{
subject
.
convert
(
pre_text
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment