Skip to content

Commit 5ba4582

Browse files
ZerdoX-xterales
andauthored
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 <[email protected]>
1 parent ff7417c commit 5ba4582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frameworks/svelte.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SvelteFramework extends Framework {
2323

2424
// for visualize the regex, you can use https://regexper.com/
2525
usageMatchRegex = [
26-
'\\$[_t]\\([\'"`]({key})[\'"`]',
26+
'(\\$(_|t|format)|(get)\\(\s*(_|t|format)\s*\\))\(\s*[\'"`]({key})[\'"`]',
2727
]
2828

2929
refactorTemplates(keypath: string) {

0 commit comments

Comments
 (0)