package render
import "github.com/gohugoio/hugo/markup/goldmark/internal/render"
Index ¶
- func GetPageAndPageInner(rctx *Context) (any, any)
- func NewBaseContext(rctx *Context, renderer any, n ast.Node, src []byte, getSourceSample func() []byte, ordinal int) hooks.BaseContext
- func TextPlain(n ast.Node, source []byte) string
- type BufWriter
- func (b *BufWriter) Available() int
- func (b *BufWriter) Buffered() int
- func (b *BufWriter) Flush() error
- type Context
- func (ctx *Context) GetAndIncrementOrdinal(kind ast.NodeKind) int
- func (ctx *Context) PeekPid() uint64
- func (ctx *Context) PeekValue(k ast.NodeKind) any
- func (ctx *Context) PopPid() uint64
- func (ctx *Context) PopPos() int
- func (ctx *Context) PopRenderedString() string
- func (ctx *Context) PopValue(k ast.NodeKind) any
- func (ctx *Context) PushPid(pid uint64)
- func (ctx *Context) PushPos(n int)
- func (ctx *Context) PushValue(k ast.NodeKind, v any)
- type ContextData
- type RenderContextDataHolder
Functions ¶
func GetPageAndPageInner ¶
GetPageAndPageInner returns the current page and the inner page for the given context.
func NewBaseContext ¶
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 ¶
TextPlain returns a plain text representation of the given node. Goldmark's Node.Text was deprecated in 1.7.8.
Types ¶
type BufWriter ¶
func (*BufWriter) Available ¶
func (*BufWriter) Buffered ¶
func (*BufWriter) Flush ¶
type Context ¶
type Context struct { *BufWriter ContextData // contains filtered or unexported fields }
func (*Context) GetAndIncrementOrdinal ¶
func (*Context) PeekPid ¶
PeekPid returns the current page ID without removing it from the stack.
func (*Context) PeekValue ¶
func (*Context) PopPid ¶
PopPid pops the last page ID from the stack.
func (*Context) PopPos ¶
func (*Context) PopRenderedString ¶
func (*Context) PopValue ¶
func (*Context) PushPid ¶
PushPid pushes a new page ID to the stack.
func (*Context) PushPos ¶
func (*Context) PushValue ¶
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
Source Files ¶
- Version
- v0.140.2
- Published
- Dec 30, 2024
- Platform
- windows/amd64
- Imports
- 10 packages
- Last checked
- 13 hours ago –
Tools for package owners.