@@ -166,16 +166,16 @@ public function findTranslations($path = null)
166
166
$ functions = $ this ->config ['trans_functions ' ];
167
167
168
168
$ groupPattern = // See https://regex101.com/r/WEJqdL/6
169
- "[^\w|>] " . // Must not have an alphanum or _ or > before real method
170
- '( ' . implode ('| ' , $ functions ). ') ' . // Must start with one of the functions
171
- "\( " . // Match opening parenthesis
172
- "[\' \"] " . // Match " or '
173
- '( ' . // Start a new group to match:
174
- '[a-zA-Z0-9_-]+ ' . // Must start with group
175
- "([.](?! )[^ \1)]+)+ " . // Be followed by one or more items/keys
176
- ') ' . // Close group
177
- "[\' \"] " . // Closing quote
178
- "[\),] " ; // Close parentheses or new parameter
169
+ "[^\w|>] " . // Must not have an alphanum or _ or > before real method
170
+ '( ' . implode ('| ' , $ functions ) . ') ' . // Must start with one of the functions
171
+ "\( " . // Match opening parenthesis
172
+ "[\' \"] " . // Match " or '
173
+ '( ' . // Start a new group to match:
174
+ '[\/ a-zA-Z0-9_-]+ ' . // Must start with group
175
+ "([.](?! )[^ \1)]+)+ " . // Be followed by one or more items/keys
176
+ ') ' . // Close group
177
+ "[\' \"] " . // Closing quote
178
+ "[\),] " ; // Close parentheses or new parameter
179
179
180
180
$ stringPattern =
181
181
"[^\w] " . // Must not have an alphanum before real method
@@ -202,7 +202,7 @@ public function findTranslations($path = null)
202
202
203
203
if (preg_match_all ("/ $ stringPattern/siU " , $ file ->getContents (), $ matches )) {
204
204
foreach ($ matches ['string ' ] as $ key ) {
205
- if (preg_match ("/(^[a-zA-Z0-9_-]+([.][^ \1)\ ]+)+$)/siU " , $ key , $ groupMatches )) {
205
+ if (preg_match ("/(^[\/ a-zA-Z0-9_-]+([.][^ \1)\ ]+)+$)/siU " , $ key , $ groupMatches )) {
206
206
// group{.group}.key format, already in $groupKeys but also matched here
207
207
// do nothing, it has to be treated as a group
208
208
continue ;
0 commit comments