summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-12-28 03:03:20 +0100
committerChristian Muehlhaeuser <muesli@gmail.com>2019-12-28 03:03:20 +0100
commit79fad4d06c74925af7d8be8fcc8a04f693465bd6 (patch)
tree213885b365a7fc50c3f48b3a9988c8e9d1959888 /main.go
parentfa9d64c4ef81e16e303dafdda05de24bdb9f3d47 (diff)
Bump glamour dependency and adopt functional options API
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index 5d2ee3b..c86b92a 100644
--- a/main.go
+++ b/main.go
@@ -15,7 +15,6 @@ import (
"github.com/spf13/cobra"
"github.com/charmbracelet/glamour"
- "github.com/charmbracelet/glamour/ansi"
)
var (
@@ -130,10 +129,11 @@ func execute(cmd *cobra.Command, args []string) error {
baseURL = u.String() + "/"
}
- r, err := glamour.NewTermRenderer(style, ansi.Options{
- BaseURL: baseURL,
- WordWrap: int(width),
- })
+ r, err := glamour.NewTermRenderer(
+ glamour.WithStylePath(style),
+ glamour.WithWordWrap(int(width)),
+ glamour.WithBaseURL(baseURL),
+ )
if err != nil {
return err
}