mirror of
https://github.com/gizak/termui.git
synced 2025-04-24 13:48:50 +08:00
removing printlns
This commit is contained in:
parent
ecf49517b1
commit
a7d7cdbff3
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user