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:
parent
6a7c1ad1b4
commit
2bf8f6ba46
1 changed files with 25 additions and 1 deletions
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue