mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
fix: pass color profile down to glamour (#626)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
401610afa4
commit
1407793c5d
1 changed files with 2 additions and 0 deletions
2
main.go
2
main.go
|
@ -16,6 +16,7 @@ import (
|
||||||
"github.com/charmbracelet/glamour"
|
"github.com/charmbracelet/glamour"
|
||||||
"github.com/charmbracelet/glow/ui"
|
"github.com/charmbracelet/glow/ui"
|
||||||
"github.com/charmbracelet/glow/utils"
|
"github.com/charmbracelet/glow/utils"
|
||||||
|
"github.com/charmbracelet/lipgloss"
|
||||||
"github.com/charmbracelet/log"
|
"github.com/charmbracelet/log"
|
||||||
gap "github.com/muesli/go-app-paths"
|
gap "github.com/muesli/go-app-paths"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -262,6 +263,7 @@ func executeCLI(cmd *cobra.Command, src *source, w io.Writer) error {
|
||||||
|
|
||||||
// initialize glamour
|
// initialize glamour
|
||||||
r, err := glamour.NewTermRenderer(
|
r, err := glamour.NewTermRenderer(
|
||||||
|
glamour.WithColorProfile(lipgloss.ColorProfile()),
|
||||||
utils.GlamourStyle(style, isCode),
|
utils.GlamourStyle(style, isCode),
|
||||||
glamour.WithWordWrap(int(width)),
|
glamour.WithWordWrap(int(width)),
|
||||||
glamour.WithBaseURL(baseURL),
|
glamour.WithBaseURL(baseURL),
|
||||||
|
|
Loading…
Reference in a new issue