Open lamao opened 6 years ago
This is intended behavior, but you can at least work around the space collapsing issue by using non-breaking spaces:
val actual = "D\u00a0\u00a0F".trimMargin().wrapText(80)
assertEquals("D F", actual)
There's still the issue of newlines, however. Newlines are treated like spaces, except (in the latest release) double-newlines are preserved, like in markdown.
Perhaps it makes sense to add some additional markdown-like behavior, like a way to preserve single newlines, or a way to have pre-formatted blocks.
I want display table like message with several nested spaces for indentaion, e.g.
But multiple spaces are removed - only one is printed. I get ugly table like this