Apply tidy to SKIPIF and CLEAN section as well

This commit is contained in:
Nikita Popov 2020-09-18 12:17:07 +02:00
parent 0582c40907
commit bfceb710be

View File

@ -117,7 +117,7 @@ function transformTestCode(string $code, callable $transformer): string {
}
return preg_replace_callback(
'/(--FILE--)(.+?)(--[A-Z_]+--)/s',
'/(--(?:FILE|SKIPIF|CLEAN)--)(.+?)(--[A-Z_]+--)/s',
function(array $matches) use($transformer) {
return $matches[1] . $transformer($matches[2]) . $matches[3];
},