1
0
mirror of https://github.com/gizak/termui.git synced 2025-04-24 13:48:50 +08:00

removing printlns

This commit is contained in:
Andrew Arrow 2022-11-09 05:56:36 -08:00
parent ecf49517b1
commit a7d7cdbff3
2 changed files with 1 additions and 7 deletions

View File

@ -5,7 +5,6 @@
package termui
import (
"fmt"
"strings"
)
@ -205,7 +204,6 @@ func ParseStyles(s string, defaultStyle Style) []Cell {
if containsStyle(item) {
text := extractTextFromBlock(item)
styleText := extractStyleFromBlock(item)
fmt.Println("|" + text + "|" + styleText + "|")
style := readStyle([]rune(styleText), defaultStyle)
cells = append(cells, RunesToStyledCells([]rune(text), style)...)
} else {

View File

@ -1,7 +1,6 @@
package termui
import (
"fmt"
"strings"
"testing"
)
@ -51,9 +50,6 @@ func TestParseStyles(t *testing.T) {
if len(cells) != 17 {
t.Fatal("wrong length", len(cells))
}
text := textFromCells(cells)
fmt.Println(text)
fmt.Println(cells)
for i := 0; i < 5; i++ {
if cells[i].Style.Fg != ColorWhite {
t.Fatal("wrong fg color", cells[i], i)
@ -77,7 +73,7 @@ func TestParseStyles(t *testing.T) {
}
}
text = textFromCells(cells)
text := textFromCells(cells)
if text != "test blue and red" {
t.Fatal("wrong text", text)
}