Skip to content

Commit

Permalink
svelte: support new lines and using get() for store (lokalise#826)
Browse files Browse the repository at this point in the history
* fix: issue lokalise#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]>
  • Loading branch information
2 people authored and huacnlee committed Aug 28, 2023
1 parent 0e7aa22 commit 40b8dde
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 40b8dde

Please sign in to comment.