Documentation
¶
Index ¶
- func BuildDividerStyled(height int, style lipgloss.Style) string
- func EnsureExactHeight(content string, n int) string
- func EnsureExactWidth(content string, width int) string
- func GetMarkdownRenderer(width int) (*glamour.TermRenderer, error)
- func PadLines(content string, padding int) string
- func RenderMarkdown(text string, width int) (result string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDividerStyled ¶
BuildDividerStyled creates a vertical divider string of the given height with the given style.
func EnsureExactHeight ¶
EnsureExactHeight ensures content has exactly n lines.
func EnsureExactWidth ¶
EnsureExactWidth pads or truncates each line to exactly the given width.
func GetMarkdownRenderer ¶
func GetMarkdownRenderer(width int) (*glamour.TermRenderer, error)
GetMarkdownRenderer returns a glamour TermRenderer, reusing a cached instance when the width hasn't changed.
func RenderMarkdown ¶
RenderMarkdown renders text as styled markdown using glamour. Glamour can panic on certain inputs, so we recover gracefully.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.