Skip to content
Myr

Fix coloring glitch in Glamour example

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 70be139 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:examples/glamour/main.go+3 added-3 removed
5 unmodified lines
67 "github.com/charmbracelet/bubbles/viewport"8 tea "github.com/charmbracelet/bubbletea"9 "github.com/charmbracelet/glamour"10 "github.com/muesli/termenv"10 "github.com/charmbracelet/lipgloss"11)1213const content = `14Today’s Menu
32 unmodified lines
4748Bon appétit!49`5051var term = termenv.ColorProfile()51var helpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("241")).Render5253type example struct {54 viewport viewport.Model55}
46 unmodified lines
102 return e.viewport.View() + e.helpView()103}104105func (e example) helpView() string {106 return termenv.String("\n ↑/↓: Navigate • q: Quit\n").Foreground(term.Color("241")).String()106 return helpStyle("\n ↑/↓: Navigate • q: Quit\n")107}108109func main() {110 model, err := newExample()
10 unmodified lines