Skip to content

Commit

Permalink
fix(vue-i18n): Allow additional attributes on i18n component (#865)
Browse files Browse the repository at this point in the history
* fix(vue-i18n): Allow additional attributes on i18n component
* dont allow whitespace before/after "=", allow lf after attr
  • Loading branch information
Fuzzyma committed Aug 27, 2023
1 parent b3749c8 commit d7916a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frameworks/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VueFramework extends Framework {

// for visualize the regex, you can use https://regexper.com/
usageMatchRegex = [
'(?:i18n(?:-\\w+)?[ (\n]\\s*(?:key)?path=|v-t=[\'"`{]|(?:this\\.|\\$|i18n\\.|[^\\w\\d])(?:t|tc|te)\\()\\s*[\'"`]({key})[\'"`]',
'(?:i18n(?:-\\w+)?[ \\n]\\s*(?:\\w+=[\'"][^\'"]*[\'"][ \\n]\\s*)?(?:key)?path=|v-t=[\'"`{]|(?:this\\.|\\$|i18n\\.|[^\\w\\d])(?:t|tc|te)\\()\\s*[\'"`]({key})[\'"`]'
]

refactorTemplates(keypath: string, args: string[] = [], doc?: TextDocument, detection?: DetectionResult) {
Expand Down

0 comments on commit d7916a5

Please sign in to comment.