sgml

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTitle = "Untitled"

DefaultTitle the default title to render when the document has none

Variables

This section is empty.

Functions

func Render added in v0.8.0

func Render(doc *types.Document, config *configuration.Configuration, output io.Writer, tmpls Templates) (types.Metadata, error)

func RenderParagraphElements added in v0.8.0

func RenderParagraphElements(p *types.Paragraph) (string, error)

func RenderPlainText added in v0.8.0

func RenderPlainText(element interface{}, opts ...Option) (string, error)

Types

type Attribution

type Attribution struct {
	First  string
	Second string
}

Attribution a document block attribution

type Option added in v0.8.0

type Option func(*plaintextRenderer)

func WithoutEscape added in v0.8.0

func WithoutEscape() Option

type Templates

type Templates struct {
	AdmonitionBlock              string
	AdmonitionParagraph          string
	Article                      string
	ArticleHeader                string
	BlockImage                   string
	BoldText                     string
	CalloutList                  string
	CalloutListElement           string
	CalloutRef                   string
	EmbeddedParagraph            string
	DocumentDetails              string
	DocumentAuthorDetails        string
	ExampleBlock                 string
	ExternalCrossReference       string
	FencedBlock                  string
	Footnote                     string
	FootnoteElement              string
	FootnoteRef                  string
	Footnotes                    string
	IconFont                     string
	IconImage                    string
	IconText                     string
	InlineButton                 string
	InlineIcon                   string
	InlineImage                  string
	InlineMenu                   string
	InternalCrossReference       string
	InvalidFootnote              string
	ItalicText                   string
	LabeledList                  string
	LabeledListElement           string
	LabeledListHorizontal        string
	LabeledListHorizontalElement string
	LineBreak                    string
	Link                         string
	ListingBlock                 string
	LiteralBlock                 string
	ManpageHeader                string
	ManpageNameParagraph         string
	MarkdownQuoteBlock           string
	MarkedText                   string
	MonospaceText                string
	OpenBlock                    string
	OrderedList                  string
	OrderedListElement           string
	Paragraph                    string
	PassthroughBlock             string
	Preamble                     string
	QAndAList                    string
	QAndAListElement             string
	QuoteBlock                   string
	QuoteParagraph               string
	SectionContent               string
	SectionTitle                 string
	SidebarBlock                 string
	SourceBlock                  string
	SubscriptText                string
	SuperscriptText              string
	Table                        string
	TableBody                    string
	TableCell                    string
	TableCellBlock               string
	TableHeader                  string
	TableHeaderCell              string
	TableFooter                  string
	TableFooterCell              string
	TableRow                     string
	ThematicBreak                string
	TocEntry                     string
	TocRoot                      string
	TocSection                   string
	UnorderedList                string
	UnorderedListElement         string
	VerseBlock                   string
	VerseParagraph               string
}

Templates represents all the templates we use. go:generate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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