fix(HelpFormatter): lost one space between key and value (#4631)

This commit is contained in:
siren186 2024-08-17 13:57:09 +08:00 committed by GitHub
parent 7345bf34f9
commit e4aaeacea8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,6 +180,7 @@ void HelpFormatter::formatOption(std::ostream& ostr, const Option& option, int w
n += (int) shortPrefix().length() + (int) option.shortName().length(); n += (int) shortPrefix().length() + (int) option.shortName().length();
if (option.takesArgument()) if (option.takesArgument())
{ {
ostr << ' ';
if (!option.argumentRequired()) { ostr << '['; ++n; } if (!option.argumentRequired()) { ostr << '['; ++n; }
ostr << option.argumentName(); ostr << option.argumentName();
n += (int) option.argumentName().length(); n += (int) option.argumentName().length();