From 03796e4ec84555378be6f835aa6fd97e6405fb5b Mon Sep 17 00:00:00 2001 From: Louis Bailleau Date: Sun, 27 Aug 2023 22:05:54 +0200 Subject: [PATCH] fix: transloco translate api not detected properly (#984) Before: https://regex101.com/r/5VWV8W/1 After: https://regex101.com/r/EK75R6/1 --- src/frameworks/transloco.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frameworks/transloco.ts b/src/frameworks/transloco.ts index e04b934d..9f5a5f0b 100644 --- a/src/frameworks/transloco.ts +++ b/src/frameworks/transloco.ts @@ -25,7 +25,7 @@ export default class TranslocoFramework extends Framework { // https://ngneat.github.io/transloco/docs/translation-in-the-template#structural-directive '[^\\w\\d](?:t)\\([\\s\\n]*[\'"`]({key})[\'"`]', // https://ngneat.github.io/transloco/docs/translation-api - '[^\\w\\d](?:translate|selectTranslate|getTranslateObject|selectTranslateObject|getTranslation|setTranslationKey)\\([\\s\\n]*(.*?)[\\s\\n]*\\)', + '[^\\w\\d](?:translate|selectTranslate|getTranslateObject|selectTranslateObject|getTranslation|setTranslationKey)\\([\\s\\n]*["\'`](.*?)["\'`][\\s\\n]*\\)', // https://ngneat.github.io/transloco/docs/translation-in-the-template#attribute-directive '[^*\\w\\d]transloco=[\'"`]({key})[\'"`]', ]