term

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

The term package implements rendering HTML content for the terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer struct {
	// Width sets the assumed width of the terminal, which aids in wrapping
	// text. If < 0, then the width is unbounded.
	//
	// If == 0, then the width is determined by the current terminal, or, if
	// ForOutput is true, then the width is 80.
	Width int
	// TabSize indicates the number of characters that the terminal uses to
	// render a tab. If <= 0, then tabs are assumed to have a size of 8.
	TabSize int
	// ForOutput indicates whether content is to be renderered for output,
	// rather than for display in the current terminal.
	ForOutput bool
	// UnorderedListFormat is the text used for unordered list markers.
	UnorderedListFormat string
	// contains filtered or unexported fields
}

Renderer implements a rendering HTML content in a stripped down format suitable for the terminal.

func NewRenderer added in v0.9.0

func NewRenderer(width int) Renderer

func (Renderer) Render

func (r Renderer) Render(w io.Writer, s *goquery.Selection) error

Jump to

Keyboard shortcuts

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