olekukonko / tablewriter

ASCII table in golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

olekukonko/tablewriter broken muesli/termenv text with whitespace

SierraHQ opened this issue · comments

The workaround is set table.SetAutoWrapText(false) fix

To provide a better bug description:
Texts wrapped in ANSI color encoding (in this case also generated via https://github.com/muesli/termenv) incorrectly get linewrapped.

After all it may be that this also happens to non-ANSI encoded inputs, but it became especially apparent because of the unterminated color setting.

This is inconsistent, sometimes wrapping works correctly, sometimes it doesn't on the same column content (probably context dependent?). See the following example, technical debt:

grafik

edit: this is a duplicate of #27 and #90