From 289af25ba9c890929841e8fd3f6d48ce08cef47a Mon Sep 17 00:00:00 2001 From: Mark Lansky <49815452+ZerdoX-x@users.noreply.github.com> Date: Sat, 23 Sep 2023 11:21:13 +0000 Subject: [PATCH] fix: next-intl support multilines key detection (#1011) (#1014) --- src/frameworks/next-intl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frameworks/next-intl.ts b/src/frameworks/next-intl.ts index 879bb39e..6bb1e031 100644 --- a/src/frameworks/next-intl.ts +++ b/src/frameworks/next-intl.ts @@ -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) {