Documentation
¶
Index ¶
- type Block
- type Blocks
- type CodeBlock
- func (b *CodeBlock) Attributes() map[string]string
- func (b *CodeBlock) Content() string
- func (b *CodeBlock) Executable() string
- func (b *CodeBlock) Intro() string
- func (b *CodeBlock) Line(idx int) string
- func (b *CodeBlock) LineCount() int
- func (b *CodeBlock) Lines() (result []string)
- func (b *CodeBlock) MarshalJSON() ([]byte, error)
- func (b *CodeBlock) Name() string
- func (b *CodeBlock) SetContent(str string)
- type CodeBlocks
- type MarkdownBlock
- type ParsedSource
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blocks ¶
type Blocks []Block
func (Blocks) CodeBlocks ¶
func (b Blocks) CodeBlocks() (result CodeBlocks)
type CodeBlock ¶
type CodeBlock struct {
// contains filtered or unexported fields
}
func (*CodeBlock) Attributes ¶
Attributes returns code block attributes detected in the first line. They are of a form: "sh { attr=value }".
func (*CodeBlock) Executable ¶
Executable returns an identifier of a program to execute the block.
func (*CodeBlock) Intro ¶
Intro returns a normalized description of the code block based on the preceding paragraph.
func (*CodeBlock) MarshalJSON ¶
func (*CodeBlock) SetContent ¶
SetContent sets a new content of the block.
type CodeBlocks ¶
type CodeBlocks []*CodeBlock
func (CodeBlocks) Lookup ¶
func (b CodeBlocks) Lookup(name string) *CodeBlock
func (CodeBlocks) Names ¶
func (b CodeBlocks) Names() (result []string)
type MarkdownBlock ¶
type MarkdownBlock struct {
// contains filtered or unexported fields
}
func (*MarkdownBlock) Content ¶
func (b *MarkdownBlock) Content() string
func (*MarkdownBlock) MarshalJSON ¶
func (b *MarkdownBlock) MarshalJSON() ([]byte, error)
type ParsedSource ¶
type ParsedSource struct {
// contains filtered or unexported fields
}
func (*ParsedSource) Blocks ¶
func (s *ParsedSource) Blocks() Blocks
func (*ParsedSource) CodeBlocks ¶
func (s *ParsedSource) CodeBlocks() CodeBlocks
func (*ParsedSource) Root ¶
func (s *ParsedSource) Root() ast.Node
func (*ParsedSource) Source ¶
func (s *ParsedSource) Source() []byte
func (*ParsedSource) SquashedBlocks ¶
func (s *ParsedSource) SquashedBlocks() (blocks Blocks, err error)
Click to show internal directories.
Click to hide internal directories.