fix when toggling pending escape flag

This commit is contained in:
Phong Do 2025-12-10 18:56:42 +01:00
parent 82ed9ba305
commit 2cb77c674c
1 changed files with 1 additions and 4 deletions

View File

@ -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() {