[gen_l10n] Fix unintended use of raw string in generateString (#69382)

* Fix failing tests from introducing raw string generation in gen_l10n tool
This commit is contained in:
Shi-Hao Hong
2020-10-31 19:24:53 +08:00
committed by GitHub
parent c0ef94780c
commit 4996f60b20
5 changed files with 94 additions and 93 deletions

View File

@@ -378,9 +378,9 @@ class $classNamePrefix$camelCaseName extends $superClass {''';
///
/// This function is used by tools that take in a JSON-formatted file to
/// generate Dart code. For this reason, characters with special meaning
/// in JSON files. For example, the backspace character (\b) have to be
/// properly escaped by this function so that the generated Dart code
/// correctly represents this character:
/// in JSON files are escaped. For example, the backspace character (\b)
/// has to be properly escaped by this function so that the generated
/// Dart code correctly represents this character:
/// ```
/// foo\bar => 'foo\\bar'
/// foo\nbar => 'foo\\nbar'