markdown

package
v1.30.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package markdown provides a high-performance markdown renderer for terminal output. This is a custom implementation optimized for speed, replacing glamour for TUI rendering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGlamourRenderer

func NewGlamourRenderer(width int) *glamour.TermRenderer

NewGlamourRenderer creates a markdown renderer using glamour. This is kept for compatibility and testing purposes.

func ResetStyles

func ResetStyles()

ResetStyles resets the cached markdown styles so they will be rebuilt on next use. Call this when the theme changes to pick up new colors.

Types

type FastRenderer

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

FastRenderer is a high-performance markdown renderer optimized for terminal output. It directly parses and renders markdown without building an intermediate AST.

func NewFastRenderer

func NewFastRenderer(width int) *FastRenderer

NewFastRenderer creates a new fast markdown renderer with the given width.

func (*FastRenderer) Render

func (r *FastRenderer) Render(input string) (string, error)

Render parses and renders markdown content to styled terminal output.

type Renderer

type Renderer interface {
	Render(input string) (string, error)
}

Renderer is an interface for markdown renderers.

func NewRenderer

func NewRenderer(width int) Renderer

NewRenderer creates a new markdown renderer with the given width.

Jump to

Keyboard shortcuts

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