fix: unicode byte counting error #3150 (#3159)

Co-authored-by: hk <alexhaka10@protonmail.com>
This commit is contained in:
ahkrr 2021-03-11 19:11:07 +01:00 committed by GitHub
parent 0d305d7c3e
commit 86a89404be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -388,7 +388,7 @@ fn parse_invocation(
.item
.chars()
.skip(2)
.take(lite_arg.item.len() - 3)
.take(lite_arg.item.chars().count() - 3)
.collect();
// We haven't done much with the inner string, so let's go ahead and work with it