Update Core\Config

Regular expression fix for 47ee32f4da
It would be correct to make a recursive regex, but I'm completely too lazy to figure it out :(
This commit is contained in:
Visman 2021-12-24 20:54:17 +07:00
parent 6a7c1ad1b4
commit 2bf8f6ba46

View file

@ -88,7 +88,31 @@ class Config
{
if (
false === \preg_match_all(
'%//[^\r\n]*+|#[^\r\n]*+|/\*.*?\*/|\'.*?(?<!\\\\)\'|".*?(?<!\\\\)"|\s+|\[|\]|,|=>|\S+(?<![,\]\)])%s',
'%
//[^\r\n]*+
|
\#[^\r\n]*+
|
/\*.*?\*/
|
\'.*?(?<!\\\\)\'
|
".*?(?<!\\\\)"
|
\s+
|
\[
|
\]
|
,
|
=>
|
function\s*\(.+?\)\s*\{.*?\}(?=,)
|
\S+(?<![,\]\)])
%sx',
\substr($this->fileContents, $this->arrayStartPos),
$matches
)