Handle newlines in description

This commit is contained in:
parkertomatoes 2018-10-05 11:32:14 -04:00
parent 1f7ac82495
commit 6b23ae6151

View File

@ -1415,7 +1415,12 @@ namespace cxxopts
lastSpace = current; lastSpace = current;
} }
if (size > width) if (*current == '\n')
{
startLine = current + 1;
lastSpace = startLine;
}
else if (size > width)
{ {
if (lastSpace == startLine) if (lastSpace == startLine)
{ {