Skip to content

Commit

Permalink
Preserve newlines in Doc comments clap-rs#2389
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Steding committed Mar 9, 2021
1 parent 42c0377 commit 46e152e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clap_derive/src/utils/doc_comments.rs
Expand Up @@ -100,5 +100,9 @@ fn is_blank(s: &str) -> bool {
}

fn merge_lines(lines: &[&str]) -> String {
lines.iter().map(|s| s.trim()).collect::<Vec<_>>().join(" ")
lines
.iter()
.map(|s| s.trim())
.collect::<Vec<_>>()
.join("\n")
}

0 comments on commit 46e152e

Please sign in to comment.