Skip to content

Commit 38864db

Browse files
committed
change cli colors option from simple to true
1 parent df270f5 commit 38864db

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $options = [
4747
'ignoreWhitespace' => true,
4848
'ignoreCase' => true,
4949
'context' => 2,
50-
'cliColor' => 'simple' // for cli output
50+
'cliColor' => true // for cli output
5151
];
5252

5353
// Initialize the diff class.

example/cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
$renderer = new UnifiedCli(
4545
// Define renderer options.
4646
[
47-
'cliColor' => 'simple',
47+
'cliColor' => true,
4848
]
4949
);
5050

lib/jblond/Diff/Renderer/Text/UnifiedCli.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function render(): string
4949
if (!isset($this->options['cliColor'])) {
5050
return $this->output();
5151
}
52-
if (isset($this->options['cliColor']) && $this->options['cliColor'] == 'simple') {
52+
if (isset($this->options['cliColor'])) {
5353
return $this->output();
5454
}
5555
throw new InvalidArgumentException('Invalid cliColor option');
@@ -63,7 +63,7 @@ public function render(): string
6363
*/
6464
private function colorizeString($string, $color = ''): string
6565
{
66-
if (isset($this->options['cliColor']) && $this->options['cliColor'] == 'simple') {
66+
if (isset($this->options['cliColor'])) {
6767
return $this->colors->getColoredString($string, $color);
6868
}
6969
return $string;

0 commit comments

Comments
 (0)