Skip to content

Commit 48b84a3

Browse files
Use a more impossible placeholder pattern in Colors::colorize()
This prevents true percent + space combinations from losing the space.
1 parent c6f72ea commit 48b84a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cli/Colors.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ static public function colorize($string, $colored = null) {
127127
return $return;
128128
}
129129

130-
$string = str_replace('%%', '% ', $string);
130+
$string = str_replace('%%', '%¾', $string);
131131

132132
foreach (self::getColors() as $key => $value) {
133133
$string = str_replace($key, self::color($value), $string);
134134
}
135135

136-
$string = str_replace('% ', '%', $string);
136+
$string = str_replace('%¾', '%', $string);
137137
self::cacheString($passed, $string, $colored);
138138

139139
return $string;

0 commit comments

Comments
 (0)