File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,9 @@ function php_strip_whitespace(string $file): string
3535 if (preg_match ('!^(//|#[^\[]).*$! ' , $ line )) {
3636 return null ;
3737 }
38- // Prevent processing non-comment lines (eg: containing php:// or http:// uris)
39- // to be mistakenly treated as such
40- return preg_replace ('!\s(//|#[^\[]).*$! ' , '' , $ line );
41- // Not working: breaks phpcc self-compiling
42- //return preg_replace('!([^:])' . '(//|#[^\[])' . '.*$!', '$1', $line);
38+ // Prevent processing non-comment lines to be mistakenly treated as such
39+ // eg: context uris containing "php://" or "http://", or this regexp
40+ return preg_replace ('!([^:(])(//|#[^\[]).*$! ' , '$1 ' , $ line );
4341 }, $ lines );
4442
4543 // Second pass: multi-line comments
You can’t perform that action at this time.
0 commit comments