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

progress with style

This commit is contained in:
Andrew Arrow 2022-11-07 11:25:41 -08:00
parent 22d00586db
commit c77684f434

View File

@ -151,10 +151,13 @@ func ParseStyles(s string, defaultStyle Style) []Cell {
}
//test blue fg:blue,bg:white,mod:bold and red fg:red and maybe even foo bg:red !
style := defaultStyle
for i := len(items) - 1; i > -1; i-- {
if containsColorOrMod(items[i]) {
style = readStyle([]rune(items[i]), defaultStyle)
} else {
fmt.Println(items[i])
cells = append(cells, RunesToStyledCells([]rune(items[i]), style)...)
style = defaultStyle
}
}