Skip to content

Commit

Permalink
Added trimming to unquoted envs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxwilko committed Jan 4, 2023
1 parent bb04049 commit 49c4a58
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Parser/EnvLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ public function match(string $str, int $line, int $offset): ?array

switch ($name) {
case static::T_ENV:
return [
'match' => $matches[0],
'env' => [
'key' => $matches[1],
'value' => trim($matches[2]),
],
'token' => $name,
'line' => $line + 1
];
case static::T_QUOTED_ENV:
return [
'match' => $matches[0],
Expand Down

0 comments on commit 49c4a58

Please sign in to comment.