fix interpolated strings when using unicode (#3866)

* fix interpolated strings when using unicode

* added test case
This commit is contained in:
Darren Schroeder
2021-07-29 19:07:34 -05:00
committed by GitHub
parent 23ba01d89c
commit 1e15f26e98
2 changed files with 14 additions and 1 deletions

View File

@ -650,7 +650,7 @@ fn parse_interpolated_string(
scope: &dyn ParserScope,
) -> (SpannedExpression, Option<ParseError>) {
trace!("Parse_interpolated_string");
let string_len = lite_arg.item.len();
let string_len = lite_arg.item.chars().count();
let inner_string = lite_arg
.item
.chars()