Skip to content

Commit

Permalink
fix: handle string interpolation at the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed Jun 1, 2021
1 parent 3e56b59 commit 1ea7ac5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.7.2

- fix: handle string interpolation at the beginning (for `braces` and `double_braces`)

## 4.7.1

- fix: `build_runner` generation error
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ It is recommended to add `fast_i18n` to `dev_dependencies`.
```yaml
dev_dependencies:
build_runner: any
fast_i18n: 4.7.1
fast_i18n: 4.7.2
```
**Step 2: Create JSON files**
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ packages:
name: fast_i18n
url: "https://pub.dartlang.org"
source: hosted
version: "4.7.1"
version: "4.7.2"
file:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
cupertino_icons: ^1.0.2

dev_dependencies:
fast_i18n: ^4.7.1 # add this
fast_i18n: ^4.7.2 # add this
build_runner: any # and this

flutter:
Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ class Utils {
static RegExp argumentsDartRegex = RegExp(r'([^\\]|^)\$\{?(\w+)\}?');

/// matches {argument}
static RegExp argumentsBracesRegex = RegExp(r'([^\\])\{(\w+)\}');
static RegExp argumentsBracesRegex = RegExp(r'([^\\]|^)\{(\w+)\}');

/// matches {{argument}}
static RegExp argumentsDoubleBracesRegex = RegExp(r'([^\\])\{\{(\w+)\}\}');
static RegExp argumentsDoubleBracesRegex = RegExp(r'([^\\]|^)\{\{(\w+)\}\}');

/// locale regex
static const LOCALE_REGEX_RAW =
Expand Down

0 comments on commit 1ea7ac5

Please sign in to comment.