Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupHeaders(doc string) string
- func Extensions() parser.Extensions
- func FinalRender(doc ast.Node, renderer ColumnRenderer) []byte
- func NewRenderer(lineWidth int, leftPad int, columnsNum int, opts ...Options) *renderer
- func Render(source string, lineWidth int, columns int, leftPad int, opts ...Options) []byte
- type CellAlign
- type ColumnRenderer
- type DitheringMode
- type Options
Constants ¶
View Source
const ( NoDithering = DitheringMode(iota) DitheringWithBlocks DitheringWithChars )
Variables ¶
View Source
var ( Green = color.New(color.FgGreen).SprintFunc() HiGreen = color.New(color.FgHiGreen).SprintFunc() GreenBold = color.New(color.FgGreen, color.Bold).SprintFunc() Blue = color.New(color.FgBlue).SprintFunc() BlueBgItalic = color.New(color.BgBlue, color.Italic).SprintFunc() Red = color.New(color.FgRed).SprintFunc() )
Functions ¶
func CleanupHeaders ¶
func Extensions ¶
func Extensions() parser.Extensions
Extensions returns the bitmask of extensions supported by this renderer. The output of this function can be used to instantiate a new markdown parser using the `NewWithExtensions` function.
func FinalRender ¶
func FinalRender(doc ast.Node, renderer ColumnRenderer) []byte
func NewRenderer ¶
/ NewRenderer creates a new instance of the console renderer
Types ¶
type ColumnRenderer ¶
type DitheringMode ¶
type DitheringMode uint8
DitheringMode type is used for image scale dithering mode constants.
type Options ¶
type Options func(r *renderer)
func WithBlockquoteShades ¶
func WithBlockquoteShades(shades []shadeFmt) Options
Use a custom collection of ANSI colors for the blockquotes
func WithHeadingShades ¶
func WithHeadingShades(shades []shadeFmt) Options
Use a custom collection of ANSI colors for the headings
func WithImageDithering ¶
func WithImageDithering(mode DitheringMode) Options
Dithering mode for ansimage Default is fine directly through a terminal DitheringWithBlocks is recommended if a terminal UI library is used
Source Files ¶
Click to show internal directories.
Click to hide internal directories.