Skip to content

Commit

Permalink
svelte: support new lines and using get() for store (#826)
Browse files Browse the repository at this point in the history
* 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 <terales@users.noreply.github.com>
  • Loading branch information
ZerdoX-x and terales committed Aug 27, 2023
1 parent ff7417c commit 5ba4582
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frameworks/svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5ba4582

Please sign in to comment.