markdown

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package markdown renders GitHub markdown bodies as terminal lines. Pull request bodies and comments arrive as GitHub-flavored markdown carrying raw HTML, and a release-note dump from a bot is mostly `<details>` blocks and anchor tags, so printing the source verbatim buries the few lines a reader wants. This is a reader for that text, not a conforming CommonMark parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(body string, width, maxLines int, s Styles) []string

Render lays out a markdown body as styled lines wrapped to width, keeping at most maxLines of them and saying how many it dropped. A maxLines of zero keeps everything.

Types

type Styles

type Styles struct {
	Body    lipgloss.Style
	Heading lipgloss.Style
	Muted   lipgloss.Style
}

Styles names the three roles a rendered body draws on. Callers supply their own so this package carries no palette of its own.

Jump to

Keyboard shortcuts

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