mirror of
https://github.com/CLIUtils/CLI11.git
synced 2026-01-19 04:52:08 +00:00
Help spacing (#1229)
Fix the help spacing and double printing of footers in certain circumstances --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -147,7 +147,7 @@ CLI11_INLINE std::string Formatter::make_footer(const App *app) const {
|
||||
if(footer.empty()) {
|
||||
return std::string{};
|
||||
}
|
||||
return '\n' + footer + "\n\n";
|
||||
return '\n' + footer + '\n';
|
||||
}
|
||||
|
||||
CLI11_INLINE std::string Formatter::make_help(const App *app, std::string name, AppFormatMode mode) const {
|
||||
@@ -263,12 +263,13 @@ CLI11_INLINE std::string Formatter::make_expanded(const App *sub, AppFormatMode
|
||||
footer_string = "";
|
||||
}
|
||||
}
|
||||
if(is_footer_paragraph_formatting_enabled()) {
|
||||
detail::streamOutAsParagraph(out, footer_string, footer_paragraph_width_); // Format footer as paragraph
|
||||
} else {
|
||||
out << footer_string << '\n';
|
||||
if(!footer_string.empty()) {
|
||||
if(is_footer_paragraph_formatting_enabled()) {
|
||||
detail::streamOutAsParagraph(out, footer_string, footer_paragraph_width_); // Format footer as paragraph
|
||||
} else {
|
||||
out << footer_string;
|
||||
}
|
||||
}
|
||||
out << '\n';
|
||||
return out.str();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user