Skip to content

Commit 9e81c4d

Browse files
authored
Merge pull request #335 from senyahnoj/multiline-translation-fix
Fix for doing a string match of translation functions which span mult…
2 parents cab405d + 9e28f16 commit 9e81c4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Manager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ public function findTranslations($path = null)
180180
$stringPattern =
181181
"[^\w]". // Must not have an alphanum before real method
182182
'('.implode('|', $functions).')'. // Must start with one of the functions
183-
"\(". // Match opening parenthesis
183+
"\(\s*". // Match opening parenthesis
184184
"(?P<quote>['\"])". // Match " or ' and store in {quote}
185185
"(?P<string>(?:\\\k{quote}|(?!\k{quote}).)*)". // Match any string that can be {quote} escaped
186186
"\k{quote}". // Match " or ' previously matched
187-
"[\),]"; // Close parentheses or new parameter
187+
"\s*[\),]"; // Close parentheses or new parameter
188188

189189
// Find all PHP + Twig files in the app folder, except for storage
190190
$finder = new Finder();

0 commit comments

Comments
 (0)