Documentation
¶
Index ¶
- Constants
- func AccentColor(theme string) string
- func AvailableThemes() []string
- func IsMarkdown(filename string) bool
- func LanguageFor(filename string) string
- func MutedColor(theme string) string
- func OpenInBrowser(filename, content string) error
- func PostProcessLists(markdown, rendered string) string
- func SourceToHTML(filename, content string) ([]byte, error)
- func ToHTML(filename, markdown string) ([]byte, error)
- type ANSI
- type Source
Constants ¶
const DefaultTheme = "claude"
Variables ¶
This section is empty.
Functions ¶
func AccentColor ¶
AccentColor returns the primary accent (heading) color for the theme. Used for UI chrome — borders, filename label, etc.
func AvailableThemes ¶
func AvailableThemes() []string
AvailableThemes returns the list of theme names recognized by the renderer.
func IsMarkdown ¶
IsMarkdown reports whether filename has a Markdown extension. It is the switch between the glamour pipeline (markdown) and the chroma pipeline (everything else).
func LanguageFor ¶
LanguageFor returns a human-readable lexer name for the file, e.g. "Python", "Docker", "JSON". Used for the TUI footer chrome.
func MutedColor ¶
MutedColor returns a dim secondary color for the theme. Used for the scroll percentage, secondary text.
func OpenInBrowser ¶
func PostProcessLists ¶
PostProcessLists rewrites Glamour's list output:
- Unordered: per-depth bullet glyph
- Ordered: hierarchical numbering from AST (1. / 1.1 / 1.2 / 2.)
func SourceToHTML ¶
SourceToHTML renders content as a chroma-highlighted standalone HTML page for the browser open path.