diff options
| author | Jeff Carr <[email protected]> | 2025-11-05 11:17:38 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-11-05 11:17:38 -0600 |
| commit | bb40134c730a60fa5077d2d5c122cef994a3c195 (patch) | |
| tree | c5bc145dbc6575d8eee22d57a469c4ff35bdba60 /humanTable.go | |
| parent | 357b464107b520fae4ed064b3dac639b14105e1a (diff) | |
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 { |
