Skip to content

Commit a5c179f

Browse files
committed
fix(expr): replace literals case insensitive
1 parent cde7fb8 commit a5c179f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Expression.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ protected function normalizeExpr(string $expr): string
171171
return static::$expressions[$expr];
172172
}
173173

174-
$expr = \preg_replace('~\s+~', ' ', \strtr($expr, static::$literals));
174+
$expr = \preg_replace('~\s+~', ' ', $expr);
175175
$count = \substr_count($expr, ' ');
176176

177177
if ($count < 4 || $count > 5) {
@@ -180,6 +180,6 @@ protected function normalizeExpr(string $expr): string
180180
);
181181
}
182182

183-
return $expr;
183+
return \str_ireplace(\array_keys(static::$literals), \array_values(static::$literals), $expr);
184184
}
185185
}

0 commit comments

Comments
 (0)