Skip to content

Commit 289af25

Browse files
authored
fix: next-intl support multilines key detection (#1011) (#1014)
1 parent a29bee8 commit 289af25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/frameworks/next-intl.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class NextIntlFramework extends Framework {
2828

2929
usageMatchRegex = [
3030
// Basic usage
31-
'[^\\w\\d]t\\([\'"`]({key})[\'"`]',
31+
'[^\\w\\d]t\\s*\\(\\s*[\'"`]({key})[\'"`]',
3232

3333
// Rich text
34-
'[^\\w\\d]t\.rich\\([\'"`]({key})[\'"`]',
34+
'[^\\w\\d]t\\s*\.rich\\s*\\(\\s*[\'"`]({key})[\'"`]',
3535

3636
// Raw text
37-
'[^\\w\\d]t\.raw\\([\'"`]({key})[\'"`]',
37+
'[^\\w\\d]t\\s*\.raw\\s*\\(\\s*[\'"`]({key})[\'"`]',
3838
]
3939

4040
refactorTemplates(keypath: string) {

0 commit comments

Comments
 (0)