From ea66fc81f6d7faafba1c21cbd129f239a06d82a0 Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Thu, 24 Oct 2024 13:06:31 +0300 Subject: [PATCH] [FINNA-2636] Don't match semicolon when adding !default Avoids problems with double semicolons. --- .../src/FinnaConsole/Command/Util/LessToScssCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/FinnaConsole/src/FinnaConsole/Command/Util/LessToScssCommand.php b/module/FinnaConsole/src/FinnaConsole/Command/Util/LessToScssCommand.php index f71c908b0fd..0ee7cfe485a 100644 --- a/module/FinnaConsole/src/FinnaConsole/Command/Util/LessToScssCommand.php +++ b/module/FinnaConsole/src/FinnaConsole/Command/Util/LessToScssCommand.php @@ -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); }