diff --git a/src/output/help.rs b/src/output/help.rs index d378dfde..53a030f7 100644 --- a/src/output/help.rs +++ b/src/output/help.rs @@ -454,7 +454,7 @@ impl<'help, 'app, 'parser, 'writer> Help<'help, 'app, 'parser, 'writer> { } self.none(part)?; } - if !prevent_nlh && !help.contains('\n') && (nlh || self.force_next_line) { + if !prevent_nlh && (nlh || self.force_next_line) { self.none("\n")?; } Ok(()) diff --git a/tests/help.rs b/tests/help.rs index 67781775..68d9a1bc 100644 --- a/tests/help.rs +++ b/tests/help.rs @@ -269,6 +269,7 @@ FLAGS: -h, --help Prints help information + -V, --version Prints version @@ -354,7 +355,6 @@ FLAGS: Prints version information"; -// FIXME: #1642 This should have an empty line before `-h, --help`. static ISSUE_1642: &str = "prog USAGE: @@ -366,6 +366,7 @@ FLAGS: with only valid keys and may not contain other nonsense that cannot be read by this program. Obviously I'm going on and on, so I'll stop now. + -h, --help Prints help information