forked from extern/egroupware
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;
|
if (($content = file_get_contents($file)) === false) return false;
|
||||||
|
|
||||||
// remove commented lines
|
// replace commented lines with empty ones
|
||||||
$lines = preg_replace('#(//.*$|/\\*.*\\*/)#msU', '', $content);
|
$lines = preg_replace_callback('#(//.*$|/\\*.*\\*/)#msU', function($matches)
|
||||||
|
{
|
||||||
|
return str_repeat("\n", substr_count($matches[0], "\n"));
|
||||||
|
}, $content);
|
||||||
|
|
||||||
$namespace = '';
|
$namespace = '';
|
||||||
$use = array();
|
$use = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user