diff options
author | Ruben Pollan | 2018-12-17 13:46:45 +0100 |
---|---|---|
committer | Ruben Pollan | 2018-12-17 13:46:45 +0100 |
commit | 5835d7081df3862fbfd1e30dec0a5555fe6edc6a (patch) | |
tree | d0608958623f9d59130cdcdd583cde857a94c379 | |
parent | 2e49507453ec5f5ec1052c79ad23d1c77babb67c (diff) |
Keep line changes in the description
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 64fdf05..bbc1973 100644 --- a/src/main.rs +++ b/src/main.rs @@ -129,6 +129,7 @@ fn print_event(event: &Event) { ); if !event.description.is_empty() { - println!(" {} {}", " ".repeat(11), event.description.cyan()); + let description = str::replace(&event.description, "\\n", &format!("\n{}", " ".repeat(16))); + println!("{}{}", " ".repeat(16), description.cyan()); } } |