Skip to content

Commit 41f1df1

Browse files
committed
Bold should not affect background color
1 parent 3005d15 commit 41f1df1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SensioLabs/AnsiConverter/AnsiToHtmlConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected function convertAnsiToColor($ansi)
120120
// options: bold => 1, underscore => 4, blink => 5, reverse => 7, conceal => 8
121121
if (in_array(1, $options) || $hi) { // high intensity equals regular bold
122122
$fg += 10;
123-
$bg += 10;
123+
// bold does not affect background color
124124
}
125125

126126
if (in_array(4, $options)) {

SensioLabs/AnsiConverter/Tests/AnsiToHtmlConverterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getConvertData()
4444
array('<span style="background-color: darkred; color: darkred">foo</span>', "\e[31;41mfoo\e[m"),
4545

4646
// bright color
47-
array('<span style="background-color: red; color: red">foo</span>', "\e[31;41;1mfoo\e[0m"),
47+
array('<span style="background-color: darkred; color: red">foo</span>', "\e[31;41;1mfoo\e[0m"),
4848

4949
// carriage returns
5050
array('<span style="background-color: black; color: white">foobar</span>', "foo\rbar\rfoobar"),

0 commit comments

Comments
 (0)