From 40b8ddef8a519ad4863d13b374f6e1f2ada624ff Mon Sep 17 00:00:00 2001 From: Mark Lansky <49815452+ZerdoX-x@users.noreply.github.com> Date: Sun, 27 Aug 2023 20:32:40 +0000 Subject: [PATCH] svelte: support new lines and using `get()` for store (#826) * fix: issue #132 for svelte * add `get()` support * replace .* with {key} * add support for spaces & line breaks in get() * Empty commit to trigger CI --------- Co-authored-by: Alex Terehov --- src/frameworks/svelte.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frameworks/svelte.ts b/src/frameworks/svelte.ts index 50585f20..503a33fd 100644 --- a/src/frameworks/svelte.ts +++ b/src/frameworks/svelte.ts @@ -23,7 +23,7 @@ class SvelteFramework extends Framework { // for visualize the regex, you can use https://regexper.com/ usageMatchRegex = [ - '\\$[_t]\\([\'"`]({key})[\'"`]', + '(\\$(_|t|format)|(get)\\(\s*(_|t|format)\s*\\))\(\s*[\'"`]({key})[\'"`]', ] refactorTemplates(keypath: string) {