Skip to content

Commit

Permalink
Change regex to allow spaces in the array syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
battye committed Apr 13, 2019
1 parent 8c922f3 commit 4243ae1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 39 deletions.
80 changes: 42 additions & 38 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ protected function guessPluralRule()
public static function arrayParser($file)
{
// Parse language files that use new or old array formats
$regex = '/\$lang\s*=\s*array_merge\(\$lang,\s*(?|array\((.*?)\)|\[(.*?)\])\);/s';
$regex = '/\$lang\s*=\s*array_merge\s*\(\$lang,\s*(?|array\s*\((.*?)\)|\[(.*?)\])\);/s';
return parser::parse_regex($regex, $file);
}

Expand Down

0 comments on commit 4243ae1

Please sign in to comment.