summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattn
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattn')
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_windows.go4
-rw-r--r--vendor/github.com/mattn/godown/godown.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go
index 04c4229c..41215d7f 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_windows.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go
@@ -719,7 +719,7 @@ loop:
n256setup()
}
attr &= backgroundMask
- attr |= n256foreAttr[n256]
+ attr |= n256foreAttr[n256%len(n256foreAttr)]
i += 2
}
} else if len(token) == 5 && token[i+1] == "2" {
@@ -761,7 +761,7 @@ loop:
n256setup()
}
attr &= foregroundMask
- attr |= n256backAttr[n256]
+ attr |= n256backAttr[n256%len(n256backAttr)]
i += 2
}
} else if len(token) == 5 && token[i+1] == "2" {
diff --git a/vendor/github.com/mattn/godown/godown.go b/vendor/github.com/mattn/godown/godown.go
index 5aae9690..12f59882 100644
--- a/vendor/github.com/mattn/godown/godown.go
+++ b/vendor/github.com/mattn/godown/godown.go
@@ -303,10 +303,10 @@ func walk(node *html.Node, w io.Writer, nest int, option *Option) {
walk(c, &buf, 1, option)
if lines := strings.Split(strings.TrimSpace(buf.String()), "\n"); len(lines) > 0 {
for i, l := range lines {
- if i > 0 || nest > 0 {
+ if i > 0 {
fmt.Fprint(w, "\n")
}
- fmt.Fprint(w, strings.Repeat(" ", nest)+strings.TrimSpace(l))
+ fmt.Fprint(w, strings.Repeat(" ", nest)+l)
}
fmt.Fprint(w, "\n")
}