Commit f75feab968a614ed050f68f8019d04337cd1c25b
Committed by
jarro2783
1 parent
1f7ac824
Handle newlines in description (#138)
Showing
1 changed file
with
6 additions
and
1 deletions
include/cxxopts.hpp
| ... | ... | @@ -1415,7 +1415,12 @@ namespace cxxopts |
| 1415 | 1415 | lastSpace = current; |
| 1416 | 1416 | } |
| 1417 | 1417 | |
| 1418 | - if (size > width) | |
| 1418 | + if (*current == '\n') | |
| 1419 | + { | |
| 1420 | + startLine = current + 1; | |
| 1421 | + lastSpace = startLine; | |
| 1422 | + } | |
| 1423 | + else if (size > width) | |
| 1419 | 1424 | { |
| 1420 | 1425 | if (lastSpace == startLine) |
| 1421 | 1426 | { | ... | ... |