summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mgutz/ansi/ansi.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mgutz/ansi/ansi.go')
-rw-r--r--vendor/github.com/mgutz/ansi/ansi.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/mgutz/ansi/ansi.go b/vendor/github.com/mgutz/ansi/ansi.go
index dc041364..9ab6979d 100644
--- a/vendor/github.com/mgutz/ansi/ansi.go
+++ b/vendor/github.com/mgutz/ansi/ansi.go
@@ -24,9 +24,11 @@ const (
highIntensityBG = 100
start = "\033["
+ normal = "0;"
bold = "1;"
- blink = "5;"
+ dim = "2;"
underline = "4;"
+ blink = "5;"
inverse = "7;"
strikethrough = "9;"
@@ -164,10 +166,14 @@ func colorCode(style string) *bytes.Buffer {
buf.WriteString(start)
base := normalIntensityFG
+ buf.WriteString(normal) // reset any previous style
if len(fgStyle) > 0 {
if strings.Contains(fgStyle, "b") {
buf.WriteString(bold)
}
+ if strings.Contains(fgStyle, "d") {
+ buf.WriteString(dim)
+ }
if strings.Contains(fgStyle, "B") {
buf.WriteString(blink)
}