mirror of
https://codeberg.org/scip/tablizer.git
synced 2026-03-23 17:40:57 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3b3cb3f70 | ||
| 2122805301 | |||
| 935f5cc28f | |||
| 6e7b6c1a20 |
@@ -28,7 +28,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Version = "v1.6.0"
|
Version = "v1.6.1"
|
||||||
MAXPARTS = 2
|
MAXPARTS = 2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -255,7 +255,15 @@ 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(tableString.String(), "\n") {
|
||||||
|
cleanedString.WriteString(strings.TrimSpace(row))
|
||||||
|
cleanedString.WriteString("\n")
|
||||||
|
}
|
||||||
|
|
||||||
|
output(writer, conf, color.Sprint(colorizeData(conf, cleanedString.String())))
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
BIN
screenshot-highlight-by-pattern.png
Normal file
BIN
screenshot-highlight-by-pattern.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
screenshot-highlight-lines.png
Normal file
BIN
screenshot-highlight-lines.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
BIN
screenshot-interactive-mode.png
Normal file
BIN
screenshot-interactive-mode.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Reference in New Issue
Block a user