diff --git a/scripts/dev/tidy.php b/scripts/dev/tidy.php index 967f83bcb3b..c7f6591e2f0 100644 --- a/scripts/dev/tidy.php +++ b/scripts/dev/tidy.php @@ -126,9 +126,9 @@ function transformTestCode(string $code, callable $transformer): string { } return preg_replace_callback( - '/(--(?:FILE|SKIPIF|CLEAN)--)(.+?)(--[A-Z_]+--)/s', + '/(--(?:FILE|SKIPIF|CLEAN)--)(.+?)(?=--[A-Z_]+--)/s', function(array $matches) use($transformer) { - return $matches[1] . $transformer($matches[2]) . $matches[3]; + return $matches[1] . $transformer($matches[2]); }, $code );