Skip to content

Commit e3e8bcf

Browse files
authored
Merge pull request #57 from battye/bugfix/array-spaces
Change regex to allow spaces in the array syntax
2 parents a9d017d + 4243ae1 commit e3e8bcf

File tree

2 files changed

+43
-39
lines changed

2 files changed

+43
-39
lines changed

composer.lock

Lines changed: 42 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Phpbb/TranslationValidator/Validator/ValidatorRunner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ protected function guessPluralRule()
267267
public static function arrayParser($file)
268268
{
269269
// Parse language files that use new or old array formats
270-
$regex = '/\$lang\s*=\s*array_merge\(\$lang,\s*(?|array\((.*?)\)|\[(.*?)\])\);/s';
270+
$regex = '/\$lang\s*=\s*array_merge\s*\(\$lang,\s*(?|array\s*\((.*?)\)|\[(.*?)\])\);/s';
271271
return parser::parse_regex($regex, $file);
272272
}
273273

0 commit comments

Comments
 (0)