diff options
Diffstat (limited to 'humanTable.go')
| -rw-r--r-- | humanTable.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/humanTable.go b/humanTable.go index caf0bba..70f94aa 100644 --- a/humanTable.go +++ b/humanTable.go @@ -30,7 +30,10 @@ func StandardTableRow(sizes []int, args []string) (string, string) { } fmts = append(fmts, sfmt) if len(args) > i { - val := strings.Join(strings.Fields(args[i]), " ") // removes all newlines + val := strings.ReplaceAll(args[i], "\r", "") + val = strings.ReplaceAll(val, "\n", "") + // removes newlines but squashes spaces (which is bad) + // val := strings.Join(strings.Fields(args[i]), " ") cell = fmt.Sprintf(sfmt, val) parts = append(parts, cell) } else { |
