diff options
author | Andrew Engelbrecht <ae@n0r.co> | 2018-04-29 23:37:18 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-04-30 10:44:13 -0700 |
commit | e8df859da2894fb29cacce43ba9940b329fc1e57 (patch) | |
tree | bfe7137b3a7e0fbc15a4543baee72ce535a72b1c /app/Console/LocaleComparatorCommand.php | |
parent | f3ed96f161813ad841be69f255b68fcd0fecd0d8 (diff) |
better whitespace handling by ./cli locale:compare
Diffstat (limited to 'app/Console/LocaleComparatorCommand.php')
-rw-r--r-- | app/Console/LocaleComparatorCommand.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Console/LocaleComparatorCommand.php b/app/Console/LocaleComparatorCommand.php index de83714f..fd29d13e 100644 --- a/app/Console/LocaleComparatorCommand.php +++ b/app/Console/LocaleComparatorCommand.php @@ -63,11 +63,11 @@ class LocaleComparatorCommand extends BaseCommand $content = file_get_contents($filename); $strings = array(); - if (preg_match_all('/\b[et]\((\'\K.*?\') *[\)\,]/', $content, $matches) && isset($matches[1])) { + if (preg_match_all('/\b[et]\s*\(\s*(\'\K.*?\')\s*[\)\,]/', $content, $matches) && isset($matches[1])) { $strings = $matches[1]; } - if (preg_match_all('/\bdt\((\'\K.*?\') *[\)\,]/', $content, $matches) && isset($matches[1])) { + if (preg_match_all('/\bdt\s*\(\s*(\'\K.*?\')\s*[\)\,]/', $content, $matches) && isset($matches[1])) { $strings = array_merge($strings, $matches[1]); } |