Compare commits

...

5 Commits

Author SHA1 Message Date
T. von Dein
d4d76f7ff5 fix #52: get rid of excess newline on ascii tables (#53) 2026-03-06 11:58:02 +01:00
T. von Dein
e3b3cb3f70 fix-ascii-spacing (#51)
fix #50: remove excess spaces in normal ascii table output mode
2026-02-19 13:55:04 +01:00
2122805301 add highlight pattern screenshot 2026-01-20 13:07:16 +01:00
935f5cc28f add highlight screenshot 2026-01-20 13:04:24 +01:00
6e7b6c1a20 add interactive screenshot 2026-01-20 12:38:35 +01:00
6 changed files with 40 additions and 31 deletions

View File

@@ -28,7 +28,7 @@ import (
) )
const ( const (
Version = "v1.6.0" Version = "v1.6.2"
MAXPARTS = 2 MAXPARTS = 2
) )

View File

@@ -255,7 +255,16 @@ func printASCIIData(writer io.Writer, conf cfg.Config, data *Tabdata) {
log.Fatalf("Failed to render table: %s", err) log.Fatalf("Failed to render table: %s", err)
} }
output(writer, conf, color.Sprint(colorizeData(conf, tableString.String()))) // we need to trim our output here, because tablewriter appends
// excess whitespace to our rows.
cleanedString := &strings.Builder{}
for _, row := range strings.Split(strings.TrimSpace(tableString.String()), "\n") {
cleanedString.WriteString(strings.TrimSpace(row))
cleanedString.WriteString("\n")
}
output(writer, conf, color.Sprint(colorizeData(conf, cleanedString.String())))
} }
/* /*

View File

@@ -1,5 +1,5 @@
/* /*
Copyright © 2022 Thomas von Dein Copyright © 2022-2026 Thomas von Dein
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/stretchr/testify/assert"
"codeberg.org/scip/tablizer/cfg" "codeberg.org/scip/tablizer/cfg"
"github.com/stretchr/testify/assert"
) )
func newData() Tabdata { func newData() Tabdata {

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB