File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
lib/jblond/Diff/Renderer/Text Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ $options = [
47
47
'ignoreWhitespace' => true,
48
48
'ignoreCase' => true,
49
49
'context' => 2,
50
- 'cliColor' => 'simple' // for cli output
50
+ 'cliColor' => true // for cli output
51
51
];
52
52
53
53
// Initialize the diff class.
Original file line number Diff line number Diff line change 44
44
$ renderer = new UnifiedCli (
45
45
// Define renderer options.
46
46
[
47
- 'cliColor ' => ' simple ' ,
47
+ 'cliColor ' => true ,
48
48
]
49
49
);
50
50
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function render(): string
49
49
if (!isset ($ this ->options ['cliColor ' ])) {
50
50
return $ this ->output ();
51
51
}
52
- if (isset ($ this ->options ['cliColor ' ]) && $ this -> options [ ' cliColor ' ] == ' simple ' ) {
52
+ if (isset ($ this ->options ['cliColor ' ])) {
53
53
return $ this ->output ();
54
54
}
55
55
throw new InvalidArgumentException ('Invalid cliColor option ' );
@@ -63,7 +63,7 @@ public function render(): string
63
63
*/
64
64
private function colorizeString ($ string , $ color = '' ): string
65
65
{
66
- if (isset ($ this ->options ['cliColor ' ]) && $ this -> options [ ' cliColor ' ] == ' simple ' ) {
66
+ if (isset ($ this ->options ['cliColor ' ])) {
67
67
return $ this ->colors ->getColoredString ($ string , $ color );
68
68
}
69
69
return $ string ;
You can’t perform that action at this time.
0 commit comments