renderer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Config configuration.Configuration
	// TableOfContents exists even if the document did not specify the `:toc:` attribute.
	// It will take into account the configured `:toclevels:` attribute value.
	TableOfContents      types.TableOfContents
	IncludeBlankLine     bool
	WithinDelimitedBlock bool
	WithinList           int

	Attributes        types.DocumentAttributes
	Footnotes         []types.Footnote
	ElementReferences types.ElementReferences
	HasHeader         bool
	// contains filtered or unexported fields
}

Context is a custom implementation of the standard golang context.Context interface, which carries the types.Document which is being processed

func NewContext added in v0.3.0

func NewContext(doc types.Document, config configuration.Configuration) Context

NewContext returns a new rendering context for the given document.

func (*Context) GetAndIncrementExampleBlockCounter

func (ctx *Context) GetAndIncrementExampleBlockCounter() int

GetAndIncrementExampleBlockCounter returns the current value for the example block counter after internally incrementing it.

func (*Context) GetAndIncrementImageCounter

func (ctx *Context) GetAndIncrementImageCounter() int

GetAndIncrementImageCounter returns the current value for the image counter after internally incrementing it.

func (*Context) GetAndIncrementTableCounter

func (ctx *Context) GetAndIncrementTableCounter() int

GetAndIncrementTableCounter returns the current value for the table counter after internally incrementing it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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