From 6bdab12d5282d8c061240fdd53f37059d44ff9db Mon Sep 17 00:00:00 2001 From: mattn Date: Tue, 16 Sep 2014 10:16:50 +0900 Subject: [PATCH] Support windows --- printing.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/printing.go b/printing.go index 37a9dee..8bb2ec0 100644 --- a/printing.go +++ b/printing.go @@ -5,6 +5,7 @@ import ( "code.google.com/p/go.net/html/atom" "fmt" "github.com/fatih/color" + "github.com/mattn/go-colorable" "regexp" ) @@ -21,6 +22,10 @@ var ( postWhitespace = regexp.MustCompile(`\s+$`) ) +func init() { + color.Output = colorable.NewColorableStdout() +} + func printIndent(level int) { for ; level > 0; level-- { fmt.Print(indentString)