Skip to content

Commit 60da921

Browse files
committed
table header fixes
1 parent 211322e commit 60da921

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

internal/cmd/root.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,21 @@ func displayTableStats(stats *StatsCollector) {
480480
colWidths[2], colorizeBold("Skipped", blue),
481481
colWidths[3], colorizeBold("Status", blue),
482482
)
483+
// Fix header pipe padding: ensure each header cell is padded to match the body
484+
headRunes := []rune(head)
485+
// Replace single spaces before and after pipes with nothing, then add a single space after each pipe
486+
headFixed := ""
487+
for i := 0; i < len(headRunes); i++ {
488+
headFixed += string(headRunes[i])
489+
if headRunes[i] == '│' && i+1 < len(headRunes) && headRunes[i+1] != ' ' {
490+
headFixed += " "
491+
}
492+
}
493+
// Remove any double spaces
494+
headFixed = strings.ReplaceAll(headFixed, " ", " ")
483495

484496
fmt.Println(top)
485-
fmt.Println(head)
497+
fmt.Println(headFixed)
486498
fmt.Println(sep)
487499

488500
for _, repoStat := range stats.PerRepoStats {

0 commit comments

Comments
 (0)