Skip to content

Commit 3a2086f

Browse files
committed
update regex
1 parent 0f20dfe commit 3a2086f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Manager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ public function collectFromViews()
261261
$functions = ['trans', 'trans_choice', 'Lang::get', 'Lang::choice', 'Lang::trans', 'Lang::transChoice', '@lang', '@choice'];
262262

263263
$pattern =
264-
// See http://regexr.com/392hu
264+
// See https://regex101.com/r/jS5fX0/1
265+
'[^\w]'. // Must not start with any alpha numeric character or underscore
265266
'('.implode('|', $functions).')'.// Must start with one of the functions
266267
"\(".// Match opening parentheses
267268
"[\'\"]".// Match " or '

0 commit comments

Comments
 (0)