Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter interface {
Convert(ctx RenderContext) (Result, error)
}
Converter wraps the Convert method that converts some markup into another format, e.g. Markdown to HTML.
type ConverterRegistry ¶
type DocumentContext ¶
type DocumentContext struct { Document any // May be nil. Usually a page.Page DocumentID string DocumentName string Filename string }
DocumentContext holds contextual information about the document to convert.
type Provider ¶
type Provider interface { New(ctx DocumentContext) (Converter, error) Name() string }
Provider creates converters.
type ProviderProvider ¶
ProviderProvider creates converter providers.
type RenderContext ¶
type RenderContext struct { // Src is the content to render. Src []byte // Whether to render TableOfContents. RenderTOC bool }
RenderContext holds contextual information about the content to render.
Click to show internal directories.
Click to hide internal directories.