Skip to content

Commit

Permalink
fix: regular expression
Browse files Browse the repository at this point in the history
Due to a missing question mark the regular expression does not match strings ending with fa, fal, fals but only fae, fale and false.
  • Loading branch information
ockstadt committed Apr 12, 2022
1 parent d890396 commit e168d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PadsJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function padLiteral($tmpJson)
return $tmpJson;
}

$match = \preg_match('/(tr?u?e?|fa?l?s?e|nu?l?l?)$/', $tmpJson, $matches);
$match = \preg_match('/(tr?u?e?|fa?l?s?e?|nu?l?l?)$/', $tmpJson, $matches);

if (!$match || null === $literal = $this->maybeLiteral($matches[1])) {
return $tmpJson;
Expand Down

0 comments on commit e168d9a

Please sign in to comment.