fix(colors): fallback to transparent on empty colors

resolves #3276
This commit is contained in:
Jan De Dobbeleer 2022-12-31 12:22:45 +01:00 committed by Jan De Dobbeleer
parent 3559254292
commit 784b5f1492

View file

@ -205,9 +205,15 @@ func (a *AnsiWriter) expandKeyword(keyword string) string {
case ParentForeground:
keyword = color.Foreground
default:
if len(keyword) == 0 {
return Transparent
}
return keyword
}
}
if len(keyword) == 0 {
return Transparent
}
return keyword
}
resolveKeyword := func(keyword string) string {