shared

package
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDividerStyled

func BuildDividerStyled(height int, style lipgloss.Style) string

BuildDividerStyled creates a vertical divider string of the given height with the given style.

func EnsureExactHeight

func EnsureExactHeight(content string, n int) string

EnsureExactHeight ensures content has exactly n lines.

func EnsureExactWidth

func EnsureExactWidth(content string, width int) string

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 PadLines

func PadLines(content string, padding int) string

PadLines adds left padding to each line of content.

func RenderMarkdown

func RenderMarkdown(text string, width int) (result string)

RenderMarkdown renders text as styled markdown using glamour. Glamour can panic on certain inputs, so we recover gracefully.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL