Skip to content

Commit

Permalink
Merge pull request #57 from joelcuevas/master
Browse files Browse the repository at this point in the history
ignore strings with concatenated vars when syncing
  • Loading branch information
themsaid authored Jan 30, 2017
2 parents 721dcfd + 5ee7ff3 commit 37771c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,15 @@ public function getAllViewFilesWithTranslations()
$functions = ['trans', 'trans_choice', 'Lang::get', 'Lang::choice', 'Lang::trans', 'Lang::transChoice', '@lang', '@choice'];

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

0 comments on commit 37771c0

Please sign in to comment.