summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-08 21:34:20 +0800
committerGitHub <noreply@github.com>2023-03-08 21:34:20 +0800
commit9d32837669f0aef54a67fceee3bf7211b31ed98f (patch)
treea68109784a57ac02d26b1d9c36338d3a93eb94e6 /src/main.rs
parent56483e04f0b8c74e9f7f809e1a0035ca876e35f6 (diff)
downloadaichat-9d32837669f0aef54a67fceee3bf7211b31ed98f.tar.gz
chore: optimize newline again (#43)
* chore: optimize newline again command mode: should no extra newline chat mode: should have one newline * fix windows newline * fix macos newline
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 8c24945..a25ab74 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -76,9 +76,9 @@ fn start_directive(
let output = client.send_message(input)?;
if highlight {
let mut markdown_render = MarkdownRender::new();
- println!("{}\n", markdown_render.render(&output).trim_end());
+ println!("{}", markdown_render.render(&output).trim());
} else {
- println!("{}\n", output.trim_end());
+ println!("{}", output.trim());
}
output
} else {