Trim leading and trailing whitespace from markdown output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
c14e26495d
commit
04ee58bb9e
+2
-2
@@ -367,8 +367,8 @@ fn clean_markdown(mut text: String) -> String {
|
||||
text = text.replace("\n\n\n", "\n\n");
|
||||
}
|
||||
|
||||
// Ensure ends with single newline
|
||||
text = text.trim_end().to_string();
|
||||
// Trim leading and trailing whitespace, ensure ends with single newline
|
||||
text = text.trim().to_string();
|
||||
text.push('\n');
|
||||
|
||||
text
|
||||
|
||||
Reference in New Issue
Block a user