Skip to content

Commit

Permalink
Fix escaping apostrophes in descriptions
Browse files Browse the repository at this point in the history
Fixes #3.
  • Loading branch information
Albert221 committed Jul 18, 2020
1 parent 8fc8b35 commit 830731b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/generator/l10n_dart_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ class L10nDartGenerator {
name: '${message.id}',""");

if (message.description != null && message.description.isNotEmpty) {
final description = message.description.replaceAll("'", r"\'");

messagesBuilder.write("""
desc: '${message.description}',""");
desc: '${description}',""");
}

if (arguments.all.isNotEmpty) {
Expand Down

0 comments on commit 830731b

Please sign in to comment.