if you call FormatAsTable with a row containing a string that contains a consecutive substring of non-space characters, which is longer than the chosen MaxWidthBeforeWrapping attribute of the SmartWrapOverflowBehavior and is preceded by a space, the FormatAsWrappedSegments method of the ConsoleTableBuilder will go into an endless loop until it has eaten up all the memory.
This pull request introduces a unit test for that and fixes the issue by checking if we are at the beginning of a segment before cutting off a substring.
Hi,
if you call FormatAsTable with a row containing a string that contains a consecutive substring of non-space characters, which is longer than the chosen MaxWidthBeforeWrapping attribute of the SmartWrapOverflowBehavior and is preceded by a space, the FormatAsWrappedSegments method of the ConsoleTableBuilder will go into an endless loop until it has eaten up all the memory.
This pull request introduces a unit test for that and fixes the issue by checking if we are at the beginning of a segment before cutting off a substring.