Update the detect_quote function to either use the String or FStringStart token to detect the quote (single or double).
This should probably be enough as the FStringStart token contains the prefix and quotes for the f-string:
let quote_range = tokens.iter().flatten().find_map(|(t, range)| match t {
Tok::String {
triple_quoted: false,
..
- } => Some(*range),
+ }
+ | Tok::FStringStart => Some(*range),
_ => None,
});