Skip to content

Commit

Permalink
[FINNA-2636] Don't match semicolon when adding !default
Browse files Browse the repository at this point in the history
Avoids problems with double semicolons.
  • Loading branch information
EreMaijala committed Oct 24, 2024
1 parent 5f91e6e commit ea66fc8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ protected function writeTargetFiles(): bool
}
if ($addDefault) {
foreach ($lines as &$line) {
$line = preg_replace('/(\$.+):(.+);/', '$1:$2 !default;', $line);
$line = preg_replace('/(\$.+):([^;]+);/', '$1:$2 !default;', $line);
}
unset($line);
}
Expand Down

0 comments on commit ea66fc8

Please sign in to comment.