Skip to content

Commit 367f845

Browse files
committed
Fix phpt reindentation in tidy script
This was missing adjacent SKIPIF/FILE/CLEAN sections.
1 parent 308050e commit 367f845

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/dev/tidy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ function transformTestCode(string $code, callable $transformer): string {
126126
}
127127

128128
return preg_replace_callback(
129-
'/(--(?:FILE|SKIPIF|CLEAN)--)(.+?)(--[A-Z_]+--)/s',
129+
'/(--(?:FILE|SKIPIF|CLEAN)--)(.+?)(?=--[A-Z_]+--)/s',
130130
function(array $matches) use($transformer) {
131-
return $matches[1] . $transformer($matches[2]) . $matches[3];
131+
return $matches[1] . $transformer($matches[2]);
132132
},
133133
$code
134134
);

0 commit comments

Comments
 (0)