From bb40134c730a60fa5077d2d5c122cef994a3c195 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 5 Nov 2025 11:17:38 -0600 Subject: was deleting spaces where it shouldn't be --- humanTable.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'humanTable.go') 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 { -- cgit v1.2.3