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
Boxiang Sun
gitlab-ce
Commits
57a490ec
Commit
57a490ec
authored
Jan 03, 2018
by
Danny
Committed by
Kamil Trzciński
Jan 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue #37843
parent
c6ab17f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
changelogs/unreleased/37843-ci-trace-ansi-colours-256-bold-have-no-css-due-wrongly-ansi2html-light-color-variant-conversion-feature.yml
...ngly-ansi2html-light-color-variant-conversion-feature.yml
+5
-0
lib/gitlab/ci/ansi2html.rb
lib/gitlab/ci/ansi2html.rb
+1
-1
spec/lib/gitlab/ci/ansi2html_spec.rb
spec/lib/gitlab/ci/ansi2html_spec.rb
+4
-0
No files found.
changelogs/unreleased/37843-ci-trace-ansi-colours-256-bold-have-no-css-due-wrongly-ansi2html-light-color-variant-conversion-feature.yml
0 → 100644
View file @
57a490ec
---
title
:
Fix ANSI 256 bold colors in pipelines job output
merge_request
:
author
:
type
:
fixed
lib/gitlab/ci/ansi2html.rb
View file @
57a490ec
...
...
@@ -234,7 +234,7 @@ module Gitlab
# Most terminals show bold colored text in the light color variant
# Let's mimic that here
if
@style_mask
&
STYLE_SWITCHES
[
:bold
]
!=
0
fg_color
.
sub!
(
/fg-(
\w
{2,}+)/
,
'fg-l-\1'
)
fg_color
.
sub!
(
/fg-(
[a-z]
{2,}+)/
,
'fg-l-\1'
)
end
css_classes
<<
fg_color
end
...
...
spec/lib/gitlab/ci/ansi2html_spec.rb
View file @
57a490ec
...
...
@@ -120,6 +120,10 @@ describe Gitlab::Ci::Ansi2html do
expect
(
convert_html
(
"
\e
[48;5;240mHello"
)).
to
eq
(
'<span class="xterm-bg-240">Hello</span>'
)
end
it
"can print 256 xterm fg bold colors"
do
expect
(
convert_html
(
"
\e
[38;5;16;1mHello"
)).
to
eq
(
'<span class="xterm-fg-16 term-bold">Hello</span>'
)
end
it
"can print 256 xterm bg colors on normal magenta foreground"
do
expect
(
convert_html
(
"
\e
[48;5;16;35mHello"
)).
to
eq
(
'<span class="term-fg-magenta xterm-bg-16">Hello</span>'
)
end
...
...
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