Skip to content

Commit

Permalink
Merge pull request #57 from battye/bugfix/array-spaces
Browse files Browse the repository at this point in the history
Change regex to allow spaces in the array syntax
  • Loading branch information
Crizz0 authored Apr 13, 2019
2 parents a9d017d + 4243ae1 commit e3e8bcf
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 e3e8bcf

Please sign in to comment.