Skip to content

Commit 37771c0

Browse files
authored
Merge pull request #57 from joelcuevas/master
ignore strings with concatenated vars when syncing
2 parents 721dcfd + 5ee7ff3 commit 37771c0

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
@@ -309,15 +309,15 @@ public function getAllViewFilesWithTranslations()
309309
$functions = ['trans', 'trans_choice', 'Lang::get', 'Lang::choice', 'Lang::trans', 'Lang::transChoice', '@lang', '@choice'];
310310

311311
$pattern =
312-
// See https://regex101.com/r/jS5fX0/3
312+
// See https://regex101.com/r/jS5fX0/4
313313
'[^\w]'. // Must not start with any alphanum or _
314314
'(?<!->)'. // Must not start with ->
315315
'('.implode('|', $functions).')'.// Must start with one of the functions
316316
"\(".// Match opening parentheses
317317
"[\'\"]".// Match " or '
318318
'('.// Start a new group to match:
319319
'[a-zA-Z0-9_-]+'.// Must start with group
320-
"([.][^\1)]+)+".// Be followed by one or more items/keys
320+
"([.][^\1)$]+)+".// Be followed by one or more items/keys
321321
')'.// Close group
322322
"[\'\"]".// Closing quote
323323
"[\),]" // Close parentheses or new parameter

0 commit comments

Comments
 (0)