summaryrefslogtreecommitdiff
path: root/humanTable.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-11-05 11:17:38 -0600
committerJeff Carr <[email protected]>2025-11-05 11:17:38 -0600
commitbb40134c730a60fa5077d2d5c122cef994a3c195 (patch)
treec5bc145dbc6575d8eee22d57a469c4ff35bdba60 /humanTable.go
parent357b464107b520fae4ed064b3dac639b14105e1a (diff)
was deleting spaces where it shouldn't beHEADv0.0.35masterdevel
Diffstat (limited to 'humanTable.go')
-rw-r--r--humanTable.go5
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 {