Fix formatting.

This commit is contained in:
Stephen Chung
2022-01-30 11:21:45 +08:00
parent 06214cf499
commit 8fc80ecd10
2 changed files with 4 additions and 3 deletions

View File

@@ -328,8 +328,9 @@ fn main() {
match rl.readline(prompt) {
// Line continuation
Ok(line) if line.ends_with("\\") => {
input += &line[..line.len() - 1];
Ok(mut line) if line.ends_with("\\") => {
line.pop();
input += line.trim_end();
input.push('\n');
}
Ok(line) => {