Commit a525bb1eefd63c1af0810eecac5fa5a47b13978c
1 parent
9b3d20d6
Add an eol between each option groups
Showing
1 changed file
with
6 additions
and
2 deletions
src/cxxopts.hpp
| @@ -909,9 +909,13 @@ Options::help(const std::vector<std::string>& groups) const | @@ -909,9 +909,13 @@ Options::help(const std::vector<std::string>& groups) const | ||
| 909 | std::string result = "Usage:\n " + m_program + " [OPTION...]" | 909 | std::string result = "Usage:\n " + m_program + " [OPTION...]" |
| 910 | + m_help_string + "\n\n"; | 910 | + m_help_string + "\n\n"; |
| 911 | 911 | ||
| 912 | - for (const auto& g : groups) | 912 | + for (std::size_t i = 0; i < groups.size(); ++i) |
| 913 | { | 913 | { |
| 914 | - result += help_one_group(g); | 914 | + result += help_one_group(groups[i]); |
| 915 | + if (i < groups.size() - 1) | ||
| 916 | + { | ||
| 917 | + result += "\n"; | ||
| 918 | + } | ||
| 915 | } | 919 | } |
| 916 | 920 | ||
| 917 | return result; | 921 | return result; |