4 "github.com/charmbracelet/crush/internal/ui/styles"
5 "github.com/charmbracelet/glamour/v2"
6 gstyles "github.com/charmbracelet/glamour/v2/styles"
9// MarkdownRenderer returns a glamour [glamour.TermRenderer] configured with
10// the given styles and width.
11func MarkdownRenderer(t *styles.Styles, width int) *glamour.TermRenderer {
12 r, _ := glamour.NewTermRenderer(
13 glamour.WithStyles(t.Markdown),
14 glamour.WithWordWrap(width),
19// PlainMarkdownRenderer returns a glamour [glamour.TermRenderer] with no colors
20// (plain text with structure) and the given width.
21func PlainMarkdownRenderer(width int) *glamour.TermRenderer {
22 r, _ := glamour.NewTermRenderer(
23 glamour.WithStyles(gstyles.ASCIIStyleConfig),
24 glamour.WithWordWrap(width),
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list