Skip to content

Commit

Permalink
fix: next-intl support multilines key detection (#1011) (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerdoX-x committed Sep 23, 2023
1 parent a29bee8 commit 289af25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/frameworks/next-intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class NextIntlFramework extends Framework {

usageMatchRegex = [
// Basic usage
'[^\\w\\d]t\\([\'"`]({key})[\'"`]',
'[^\\w\\d]t\\s*\\(\\s*[\'"`]({key})[\'"`]',

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

// Raw text
'[^\\w\\d]t\.raw\\([\'"`]({key})[\'"`]',
'[^\\w\\d]t\\s*\.raw\\s*\\(\\s*[\'"`]({key})[\'"`]',
]

refactorTemplates(keypath: string) {
Expand Down

0 comments on commit 289af25

Please sign in to comment.