glamour

package
v0.4.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package renderer renders the given AST to certain formats.

Index

Constants

View Source
const WalkJump goldast.WalkStatus = 100

WalkJump indicates that the walker should jump to the next node.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlamourFlushNode

type GlamourFlushNode struct{ goldast.BaseBlock }

func (*GlamourFlushNode) Kind

func (n *GlamourFlushNode) Kind() goldast.NodeKind

type GlamourNodeRenderer

type GlamourNodeRenderer struct {
	Context *renderer.Context
}

func NewGlamourNodeRenderer

func NewGlamourNodeRenderer(context *renderer.Context) *GlamourNodeRenderer

func (*GlamourNodeRenderer) RegisterFuncs

type GlamourRenderer

type GlamourRenderer struct {
	Section string
	Context *renderer.Context
	// contains filtered or unexported fields
}

func NewGlamourRenderer

func NewGlamourRenderer(actualRenderer goldrenderer.Renderer, context *renderer.Context) *GlamourRenderer

NewRenderer returns a new Renderer with given options.

func (*GlamourRenderer) AddOptions

func (r *GlamourRenderer) AddOptions(opts ...goldrenderer.Option)

func (*GlamourRenderer) Render

func (r *GlamourRenderer) Render(w io.Writer, source []byte, n goldast.Node) error

Render will individually render the child (block) nodes. This is required as Glamour buffers block node renders until the end of the document, which means execution blocks are run before any output is seen.

type JumpError

type JumpError struct {
	ToNode       goldast.Node
	ReturnToNode goldast.Node
}

func (JumpError) Error

func (e JumpError) Error() string

Jump to

Keyboard shortcuts

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