mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 12:27:51 +00:00
ScriptPluginLoader: fixed reading @tags from non-docblock lines preceding the first docblock
This commit is contained in:
parent
fc7d297f60
commit
726c5652f7
@ -64,8 +64,12 @@ class ScriptPluginLoader implements PluginLoader{
|
|||||||
|
|
||||||
$insideHeader = false;
|
$insideHeader = false;
|
||||||
foreach($content as $line){
|
foreach($content as $line){
|
||||||
if(!$insideHeader and strpos($line, "/**") !== false){
|
if(!$insideHeader){
|
||||||
$insideHeader = true;
|
if(strpos($line, "/**") !== false){
|
||||||
|
$insideHeader = true;
|
||||||
|
}else{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(preg_match("/^[ \t]+\\*[ \t]+@([a-zA-Z]+)([ \t]+(.*))?$/", $line, $matches) > 0){
|
if(preg_match("/^[ \t]+\\*[ \t]+@([a-zA-Z]+)([ \t]+(.*))?$/", $line, $matches) > 0){
|
||||||
@ -79,7 +83,7 @@ class ScriptPluginLoader implements PluginLoader{
|
|||||||
$data[$key] = $content;
|
$data[$key] = $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($insideHeader and strpos($line, "*/") !== false){
|
if(strpos($line, "*/") !== false){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user