Skip to content

Commit b4bbb7d

Browse files
committed
Fix pretty-printing of raw strings.
1 parent d98c73c commit b4bbb7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/visitors/printer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ fn format_expr(e: &Expression) -> String {
493493
Expression::ImaginaryFloat(ref n) => format!("{}j", format_float(*n)),
494494
Expression::String(ref v) => {
495495
space_join(v.iter().map(|PyString { prefix, content }|
496-
format!("{}\"{}\"", prefix, content.chars().map(|c| match c {
496+
format!("{}\"{}\"", prefix.to_ascii_lowercase().replace("r", ""), content.chars().map(|c| match c {
497497
'\r' => "\\r".to_string(),
498498
'\n' => "\\n".to_string(),
499499
'\t' => "\\t".to_string(),

0 commit comments

Comments
 (0)