Documentation
¶
Overview ¶
Package markdown renders GFM (produced by internal/adf) for the TUI through glamour, with a style derived from the active clib theme so issue bodies and comments match the rest of the dashboard. Rendering is cached per issue+width because glamour is too slow to run on every View frame.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorToken ¶ added in v0.8.0
ColorToken converts a theme color to the string form glamour accepts. ANSI palette indexes pass through as their index ("4", "212"), so the terminal's own palette renders them exactly like the rest of the chrome — round-tripping an indexed color through RGBA would bake in the standard VGA value and visibly drift from the themed UI around it.
func StyleFromTheme ¶
func StyleFromTheme(t *clibtheme.Theme) ansi.StyleConfig
StyleFromTheme derives a glamour style from the clib palette: headings in the chrome blue (H1 magenta, matching detail headers), links blue, inline code yellow, quotes and rules dim. The base config — which supplies everything not overridden here, notably the code-block chroma palette — follows the theme's declared background so a light theme never renders on glamour's dark defaults. Margins are zeroed — the panes own their padding.
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is a width-aware, cached glamour renderer. Not safe for concurrent use; the TUI renders from a single goroutine.
func NewRenderer ¶
func NewRenderer(style ansi.StyleConfig) *Renderer
NewRenderer builds a Renderer with the given glamour style.