diff options
-rw-r--r-- | src/Utils/Formatter.php | 4 | ||||
-rw-r--r-- | tests/Utils/FormatterTest.php | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php index 2ac7e3b..56d4bcb 100644 --- a/src/Utils/Formatter.php +++ b/src/Utils/Formatter.php @@ -408,6 +408,10 @@ class Formatter $prev = $curr; } + if ($this->options['type'] === 'cli') { + return $ret . "\e[0m"; + } + return $ret; } diff --git a/tests/Utils/FormatterTest.php b/tests/Utils/FormatterTest.php index 1344257..4940016 100644 --- a/tests/Utils/FormatterTest.php +++ b/tests/Utils/FormatterTest.php @@ -75,7 +75,7 @@ class FormatTest extends TestCase ), array( 'SELECT 1', - "\x1b[35mSELECT\n \x1b[92m1", + "\x1b[35mSELECT\n \x1b[92m1\e[0m", 'cli' ), ); |