Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeToText ¶ added in v0.15.0
EscapeToText returns the text corresponding to a given escape string (as passed for Escape inline type elements, without the backslash).
Types ¶
type Block ¶
type Block interface { GetLine() int // contains filtered or unexported methods }
Block represents a macro line or a text block.
type Inline ¶
type Inline struct { Type InlineType // Type of inline element (Escape, ArgEscape ...) Num int32 // Numeric content (for ArgEscape) Text string // Text content (for all types except ArgEscape) }
Inline represents an inline element in a block, such as text or an escape.
type InlineType ¶ added in v0.15.0
type InlineType int8
InlineType represents the various kinds of inline elements.
const ( // Escape represents a regular escape sequence Escape InlineType = iota // ArgEscape represents an argument escape (\$N) ArgEscape // NamedArgEscape represents a named argument escape NamedArgEscape // NamedArgEscape represents a flag escape NamedFlagEscape // VarEscape represents a variable interpolation escape VarEscape // Text represents a bunch of inline text. Text )
Click to show internal directories.
Click to hide internal directories.