mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
fix wrong line-numbers caused by removed comments
This commit is contained in:
parent
847abfb198
commit
0558781183
@ -28,8 +28,11 @@ function check_namespace($file)
|
||||
|
||||
if (($content = file_get_contents($file)) === false) return false;
|
||||
|
||||
// remove commented lines
|
||||
$lines = preg_replace('#(//.*$|/\\*.*\\*/)#msU', '', $content);
|
||||
// replace commented lines with empty ones
|
||||
$lines = preg_replace_callback('#(//.*$|/\\*.*\\*/)#msU', function($matches)
|
||||
{
|
||||
return str_repeat("\n", substr_count($matches[0], "\n"));
|
||||
}, $content);
|
||||
|
||||
$namespace = '';
|
||||
$use = array();
|
||||
|
Loading…
Reference in New Issue
Block a user