markdown

package
v1.199.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	White       = "#FFFFFF"
	Purple      = "#9B51E0"
	Blue        = "#00A3E0"
	Gray        = "#4A5568"
	Green       = "#48BB78"
	Yellow      = "#ECC94B"
	Red         = "#F56565"
	LightBlue   = "#4299E1"
	BlueLight   = "#63B3ED"
	GrayLight   = "#718096"
	GrayMid     = "#A0AEC0"
	GrayDark    = "#2D3748"
	GrayBorder  = "#CBD5E0"
	OffWhite    = "#F7FAFC"
	DarkSlate   = "#1A202C"
	GreenLight  = "#68D391"
	YellowLight = "#F6E05E"
	RedLight    = "#FC8181"
)

Base colors used throughout the application.

View Source
var Colors = struct {
	Primary    lipgloss.AdaptiveColor
	Secondary  lipgloss.AdaptiveColor
	Success    lipgloss.AdaptiveColor
	Warning    lipgloss.AdaptiveColor
	Error      lipgloss.AdaptiveColor
	Info       lipgloss.AdaptiveColor
	Subtle     lipgloss.AdaptiveColor
	HeaderBg   lipgloss.AdaptiveColor
	Border     lipgloss.AdaptiveColor
	Background lipgloss.AdaptiveColor
}{
	Primary:    lipgloss.AdaptiveColor{Light: Blue, Dark: Blue},
	Secondary:  lipgloss.AdaptiveColor{Light: Gray, Dark: GrayMid},
	Success:    lipgloss.AdaptiveColor{Light: Green, Dark: GreenLight},
	Warning:    lipgloss.AdaptiveColor{Light: Yellow, Dark: YellowLight},
	Error:      lipgloss.AdaptiveColor{Light: Red, Dark: RedLight},
	Info:       lipgloss.AdaptiveColor{Light: LightBlue, Dark: BlueLight},
	Subtle:     lipgloss.AdaptiveColor{Light: GrayLight, Dark: GrayMid},
	HeaderBg:   lipgloss.AdaptiveColor{Light: GrayDark, Dark: Gray},
	Border:     lipgloss.AdaptiveColor{Light: GrayBorder, Dark: Gray},
	Background: lipgloss.AdaptiveColor{Light: OffWhite, Dark: DarkSlate},
}

Colors defines the color scheme for markdown rendering.

Functions

func GetDefaultStyle

func GetDefaultStyle(atmosConfig schema.AtmosConfiguration) ([]byte, error)

GetDefaultStyle returns the markdown style configuration from atmos.yaml settings or falls back to built-in defaults if not configured.

func SplitMarkdownContent

func SplitMarkdownContent(content string) []string

SplitMarkdownContent splits markdown content into details and suggestion parts.

Types

type Option

type Option func(*Renderer)

Option is a function that configures the renderer.

func WithWidth

func WithWidth(width uint) Option

WithWidth sets the word wrap width for the renderer.

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer is a markdown renderer using Glamour.

func NewRenderer

func NewRenderer(atmosConfig schema.AtmosConfiguration, opts ...Option) (*Renderer, error)

NewRenderer creates a new Markdown renderer with the given options.

func NewTerminalMarkdownRenderer added in v1.162.0

func NewTerminalMarkdownRenderer(atmosConfig schema.AtmosConfiguration) (*Renderer, error)

func (*Renderer) Render

func (r *Renderer) Render(content string) (string, error)

Render renders markdown content to ANSI styled text.

func (*Renderer) RenderAscii added in v1.162.0

func (r *Renderer) RenderAscii(content string) (string, error)

func (*Renderer) RenderAsciiWithoutWordWrap added in v1.165.0

func (r *Renderer) RenderAsciiWithoutWordWrap(content string) (string, error)

func (*Renderer) RenderError

func (r *Renderer) RenderError(title, details, suggestion string) (string, error)

RenderError renders an error message with specific styling.

func (*Renderer) RenderErrorf added in v1.162.0

func (r *Renderer) RenderErrorf(content string, args ...interface{}) (string, error)

RenderErrorf renders an error message with specific styling.

func (*Renderer) RenderSuccess

func (r *Renderer) RenderSuccess(title, details string) (string, error)

RenderSuccess renders a success message with specific styling.

func (*Renderer) RenderWithoutWordWrap added in v1.165.0

func (r *Renderer) RenderWithoutWordWrap(content string) (string, error)

func (*Renderer) RenderWorkflow

func (r *Renderer) RenderWorkflow(content string) (string, error)

RenderWorkflow renders workflow documentation with specific styling.

Jump to

Keyboard shortcuts

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