mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-08 05:35:22 +00:00
Fix parse_fstring
This commit is contained in:
parent
8731e9fc50
commit
bc16c9fd8d
1 changed files with 5 additions and 1 deletions
|
@ -503,7 +503,11 @@ impl<'a> StringParser<'a> {
|
|||
}
|
||||
'\\' if !self.kind.is_raw() => {
|
||||
self.next_char();
|
||||
content.push_str(&self.parse_escaped_char()?);
|
||||
if let Some('{' | '}') = self.peek() {
|
||||
content.push_str("\\");
|
||||
} else {
|
||||
content.push_str(&self.parse_escaped_char()?);
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
content.push(ch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue