Make lists have a whitespace after a comma

It will make the string more readable and enable linebreaks in a table
This commit is contained in:
Ylva Selling
2024-03-26 11:55:47 +01:00
parent 9777f3cca4
commit f0951bc6b5

View File

@@ -404,12 +404,12 @@ std::string InListVerifier<T>::documentation() const {
std::copy(
values.begin(),
values.end(),
std::ostream_iterator<typename T::Type>(s, ",")
std::ostream_iterator<typename T::Type>(s, ", ")
);
std::string joined = s.str();
// We need to remove a trailing ',' at the end of the string
result += joined.substr(0, joined.size() - 1);
// We need to remove a trailing ',' and whitespace at the end of the string
result += joined.substr(0, joined.size() - 2);
result += " }";
return result;