Use a Rope to power fixer (#584)

This commit is contained in:
Charlie Marsh
2022-11-04 12:04:14 -04:00
committed by GitHub
parent ec3fed5a61
commit 2be632f3cc
10 changed files with 95 additions and 99 deletions

View File

@@ -271,7 +271,7 @@ pub fn invalid_escape_sequence(
});
// Determine whether the string is single- or triple-quoted.
let quote = extract_quote(text);
let quote = extract_quote(&text);
let quote_pos = text.find(quote).unwrap();
let prefix = text[..quote_pos].to_lowercase();
let body = &text[(quote_pos + quote.len())..(text.len() - quote.len())];