diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-12-28 03:03:20 +0100 |
---|---|---|
committer | Christian Muehlhaeuser <muesli@gmail.com> | 2019-12-28 03:03:20 +0100 |
commit | 79fad4d06c74925af7d8be8fcc8a04f693465bd6 (patch) | |
tree | 213885b365a7fc50c3f48b3a9988c8e9d1959888 /main.go | |
parent | fa9d64c4ef81e16e303dafdda05de24bdb9f3d47 (diff) |
Bump glamour dependency and adopt functional options API
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 } |