render

package
v0.140.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPageAndPageInner added in v0.134.0

func GetPageAndPageInner(rctx *Context) (any, any)

GetPageAndPageInner returns the current page and the inner page for the given context.

func NewBaseContext added in v0.134.0

func NewBaseContext(rctx *Context, renderer any, n ast.Node, src []byte, getSourceSample func() []byte, ordinal int) hooks.BaseContext

NewBaseContext creates a new BaseContext.

func TextPlain added in v0.139.0

func TextPlain(n ast.Node, source []byte) string

TextPlain returns a plain text representation of the given node. Goldmark's Node.Text was deprecated in 1.7.8.

Types

type BufWriter

type BufWriter struct {
	*bytes.Buffer
}

func (*BufWriter) Available

func (b *BufWriter) Available() int

func (*BufWriter) Buffered

func (b *BufWriter) Buffered() int

func (*BufWriter) Flush

func (b *BufWriter) Flush() error

type Context

type Context struct {
	*BufWriter
	ContextData
	// contains filtered or unexported fields
}

func (*Context) GetAndIncrementOrdinal added in v0.132.0

func (ctx *Context) GetAndIncrementOrdinal(kind ast.NodeKind) int

func (*Context) PeekPid added in v0.125.0

func (ctx *Context) PeekPid() uint64

PeekPid returns the current page ID without removing it from the stack.

func (*Context) PeekValue added in v0.134.0

func (ctx *Context) PeekValue(k ast.NodeKind) any

func (*Context) PopPid added in v0.125.0

func (ctx *Context) PopPid() uint64

PopPid pops the last page ID from the stack.

func (*Context) PopPos

func (ctx *Context) PopPos() int

func (*Context) PopRenderedString added in v0.134.0

func (ctx *Context) PopRenderedString() string

func (*Context) PopValue added in v0.134.0

func (ctx *Context) PopValue(k ast.NodeKind) any

func (*Context) PushPid added in v0.125.0

func (ctx *Context) PushPid(pid uint64)

PushPid pushes a new page ID to the stack.

func (*Context) PushPos

func (ctx *Context) PushPos(n int)

func (*Context) PushValue added in v0.134.0

func (ctx *Context) PushValue(k ast.NodeKind, v any)

type ContextData

type ContextData interface {
	RenderContext() converter.RenderContext
	DocumentContext() converter.DocumentContext
}

type RenderContextDataHolder

type RenderContextDataHolder struct {
	Rctx converter.RenderContext
	Dctx converter.DocumentContext
}

func (*RenderContextDataHolder) DocumentContext

func (ctx *RenderContextDataHolder) DocumentContext() converter.DocumentContext

func (*RenderContextDataHolder) RenderContext

func (ctx *RenderContextDataHolder) RenderContext() converter.RenderContext

Jump to

Keyboard shortcuts

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