diff --git a/dark.json b/dark.json new file mode 100644 index 0000000..e760449 --- /dev/null +++ b/dark.json @@ -0,0 +1,10 @@ +{ + "link": { + "color": "123", + "underline": true + }, + "heading": { + "bold": true, + "inverse": true + } +} diff --git a/main.go b/main.go index 09b73fe..fc0eab9 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,9 @@ package main import ( + "flag" "fmt" + "os" "github.com/magicnumbers/gold" bf "gopkg.in/russross/blackfriday.v2" @@ -22,7 +24,13 @@ This is a test yo. ` func main() { - r := gold.TermRenderer{} - out := bf.Run([]byte(tmd), bf.WithRenderer(&r)) + s := flag.String("s", "", "style json path") + flag.Parse() + r, err := gold.NewTermRenderer(*s) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + out := bf.Run([]byte(tmd), bf.WithRenderer(r)) fmt.Println(string(out)) }