fix: pass color profile down to glamour (#626)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2024-07-09 16:13:32 -03:00 committed by GitHub
parent 401610afa4
commit 1407793c5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,6 +16,7 @@ import (
"github.com/charmbracelet/glamour"
"github.com/charmbracelet/glow/ui"
"github.com/charmbracelet/glow/utils"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
gap "github.com/muesli/go-app-paths"
"github.com/spf13/cobra"
@ -262,6 +263,7 @@ func executeCLI(cmd *cobra.Command, src *source, w io.Writer) error {
// initialize glamour
r, err := glamour.NewTermRenderer(
glamour.WithColorProfile(lipgloss.ColorProfile()),
utils.GlamourStyle(style, isCode),
glamour.WithWordWrap(int(width)),
glamour.WithBaseURL(baseURL),