Skip to content

Commit 04ee58b

Browse files
Trim leading and trailing whitespace from markdown output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c14e264 commit 04ee58b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/markdown.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ fn clean_markdown(mut text: String) -> String {
367367
text = text.replace("\n\n\n", "\n\n");
368368
}
369369

370-
// Ensure ends with single newline
371-
text = text.trim_end().to_string();
370+
// Trim leading and trailing whitespace, ensure ends with single newline
371+
text = text.trim().to_string();
372372
text.push('\n');
373373

374374
text

0 commit comments

Comments
 (0)