mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-25 19:14:50 -08:00
refactor: do not render empty string
This commit is contained in:
parent
b05a4573e7
commit
3bc9448be2
|
@ -108,6 +108,9 @@ func (a *AnsiColor) writeAndRemoveText(background, foreground, text, textToRemov
|
|||
}
|
||||
|
||||
func (a *AnsiColor) write(background, foreground, text string) {
|
||||
if len(text) == 0 {
|
||||
return
|
||||
}
|
||||
text = a.ansi.escapeText(text)
|
||||
text = a.ansi.formatText(text)
|
||||
text = a.ansi.generateHyperlink(text)
|
||||
|
|
Loading…
Reference in a new issue