Documentation
¶
Index ¶
- Constants
- func Render(unit *ParseUnit, writer io.Writer)
- type BaseBlockContext
- type BaseContext
- type BaseInlineContext
- type BlockContext
- type CodeFileContext
- type Context
- type HTMLContext
- type HyperLinkContext
- type InlineContext
- type ListContext
- type MediaContext
- type NoWikiContext
- type ParaContext
- type ParseUnit
- type SectionHeaderContext
- type TextEffectContext
Constants ¶
View Source
const ( AlignLeft = iota AlignCenter AlignRight )
View Source
const ( TextEffectBold = 1 << iota TextEffectItalic = 1 << iota TextEffectUnderline = 1 << iota TextEffectMonoSpace = 1 << iota )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseBlockContext ¶
type BaseBlockContext struct {
BaseContext
}
type BaseContext ¶
type BaseContext struct {
// contains filtered or unexported fields
}
func (BaseContext) GetParentContext ¶
func (b BaseContext) GetParentContext() Context
func (BaseContext) SetParentContext ¶
func (b BaseContext) SetParentContext(pContext Context)
type BaseInlineContext ¶
type BaseInlineContext struct {
BaseContext
}
type BlockContext ¶
type BlockContext interface {
Context
// contains filtered or unexported methods
}
type CodeFileContext ¶
type CodeFileContext struct {
BaseInlineContext
Text string
}
type HTMLContext ¶
type HTMLContext struct {
BaseInlineContext
Text string
}
type HyperLinkContext ¶
type HyperLinkContext struct {
BaseInlineContext
HyperLink string
Text string
IsInternal bool
}
Hyperlink text should not have effects.
type InlineContext ¶
type InlineContext interface {
Context
// contains filtered or unexported methods
}
Inline Contexts
type ListContext ¶
type ListContext struct {
BaseBlockContext
Level int
Ordered bool
InnerContexts []BlockContext
}
type MediaContext ¶
type NoWikiContext ¶
type NoWikiContext struct {
BaseInlineContext
Text string
}
type ParaContext ¶
type ParaContext struct {
BaseBlockContext
InnerContexts []InlineContext
// contains filtered or unexported fields
}
ParaContext is a fake block context that is created to contain inline blocks.
type ParseUnit ¶
type ParseUnit struct {
BaseContext
Title string
Sections []BlockContext
}
type SectionHeaderContext ¶
type SectionHeaderContext struct {
BaseBlockContext
HeaderLevel int
HeaderText string
}
SectionHeader can have bold or other text effect in it, nor links. SectionHeader should be the beginning of a line, no whitespace before it.
type TextEffectContext ¶
type TextEffectContext struct {
BaseInlineContext
EffectType uint32
Text string
}
Click to show internal directories.
Click to hide internal directories.