Skip to content

Commit

Permalink
Fix escape display
Browse files Browse the repository at this point in the history
  • Loading branch information
vinc committed Dec 15, 2023
1 parent c164eb9 commit 3765ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usr/lisp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl fmt::Display for Exp {
Exp::Bool(a) => a.to_string(),
Exp::Num(n) => n.to_string(),
Exp::Sym(s) => s.clone(),
Exp::Str(s) => format!("{:?}", s),
Exp::Str(s) => format!("{:?}", s).replace("\\u{8}", "\\b").replace("\\u{1b}", "\\e"),
Exp::List(list) => {
let xs: Vec<String> = list.iter().map(|x| x.to_string()).collect();
format!("({})", xs.join(" "))
Expand Down

0 comments on commit 3765ef9

Please sign in to comment.