diff --git a/composer.json b/composer.json index 33febc7983..264cbe76eb 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "clue/ndjson-react": "^1.3", "composer/pcre": "^3.4", "composer/xdebug-handler": "^3.0.5", - "entropy/entropy": "^0.4.15", + "entropy/entropy": "^0.4.18", "fidry/cpu-core-counter": "^1.3", "friendsofphp/php-cs-fixer": "^3.95.20", "nette/utils": "^4.1", diff --git a/src/Console/Style/EasyCodingStandardStyle.php b/src/Console/Style/EasyCodingStandardStyle.php index e3b1bc1289..2345eb4b3b 100644 --- a/src/Console/Style/EasyCodingStandardStyle.php +++ b/src/Console/Style/EasyCodingStandardStyle.php @@ -109,9 +109,6 @@ public function printErrors(array $codingStandardErrors): void */ private function normalizeTags(string $text): string { - // drop bold/underscore styling, keep the text - $text = (string) preg_replace('#]+>(.*?)#su', '$1', $text); - // → yellow, → green $text = (string) preg_replace('#(.*?)#su', '$1', $text); $text = (string) preg_replace('#(.*?)#su', '$1', $text); diff --git a/tests/Console/Style/EasyCodingStandardStyleTest.php b/tests/Console/Style/EasyCodingStandardStyleTest.php index 574a81d457..0c36f198ac 100644 --- a/tests/Console/Style/EasyCodingStandardStyleTest.php +++ b/tests/Console/Style/EasyCodingStandardStyleTest.php @@ -48,7 +48,12 @@ public static function provideData(): Iterator yield 'info tag becomes green' => ['done', 'done']; - yield 'bold options are stripped, text kept' => ['title', 'title']; + yield 'bold options pass through to colorizer' => ['title', 'title']; + + yield 'underscore options pass through to colorizer' => [ + 'Applied checkers:', + 'Applied checkers:', + ]; yield 'explicit color closing tag is normalized' => ['err', 'err'];