refactor: remove redundant rectangle filler

This commit is contained in:
Jan De Dobbeleer 2021-04-01 20:21:54 +02:00 committed by Jan De Dobbeleer
parent 513794af46
commit 447ca4bb94

View file

@ -79,13 +79,8 @@ func (e *engine) renderDiamondSegment(text string) {
}
func (e *engine) renderText(text string) {
defaultValue := " "
if e.activeSegment.background() != "" {
defaultValue = fmt.Sprintf("<%s>\u2588</>", e.activeSegment.background())
}
text = e.color.formats.generateHyperlink(text)
defaultValue := " "
prefix := e.activeSegment.getValue(Prefix, defaultValue)
postfix := e.activeSegment.getValue(Postfix, defaultValue)
e.color.write(e.activeSegment.background(), e.activeSegment.foreground(), fmt.Sprintf("%s%s%s", prefix, text, postfix))