Adding extra check if def macros are not actually present in the source
Publish PHP Package / docker (push) Successful in 6s
Details
Publish PHP Package / docker (push) Successful in 6s
Details
This commit is contained in:
parent
20e06b8433
commit
f5874a9db4
|
@ -523,7 +523,12 @@ class JSM
|
||||||
|
|
||||||
private function _extractScriptDefs(string $file, string $txt) : string
|
private function _extractScriptDefs(string $file, string $txt) : string
|
||||||
{
|
{
|
||||||
if(strpos($txt, 'def') === false)
|
$strpos = strpos($txt, 'def');
|
||||||
|
if($strpos === false)
|
||||||
|
return $txt;
|
||||||
|
|
||||||
|
//let's extra check if newline symbols preceed 'def'
|
||||||
|
if($strpos > 0 && !($txt[$strpos-1] === "\n" || $txt[$strpos-1] === "\r"))
|
||||||
return $txt;
|
return $txt;
|
||||||
|
|
||||||
//NOTE: make it more robust
|
//NOTE: make it more robust
|
||||||
|
|
Loading…
Reference in New Issue