mirror of https://github.com/astral-sh/ruff
fix when toggling pending escape flag
This commit is contained in:
parent
82ed9ba305
commit
2cb77c674c
|
|
@ -608,10 +608,7 @@ impl FormatString {
|
|||
Ok((next_char, remaining)) => {
|
||||
result_string.push(next_char);
|
||||
cur_text = remaining;
|
||||
|
||||
if next_char == '\\' {
|
||||
pending_escape = !pending_escape
|
||||
}
|
||||
pending_escape = next_char == '\\' && !pending_escape
|
||||
}
|
||||
Err(err) => {
|
||||
return if result_string.is_empty() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue