Documentation ¶
Index ¶
- Variables
- func CountFinalLineBreaks(source []byte, lineBreak []byte) int
- func DetectLineBreak(source []byte) []byte
- func ParseFrontmatter(raw string) (f Frontmatter, info FrontmatterParseInfo)
- type Attributes
- type Block
- type BlockKind
- type Blocks
- type CodeBlock
- func (b *CodeBlock) Attributes() map[string]string
- func (b *CodeBlock) Background() bool
- func (b *CodeBlock) Category() string
- func (b *CodeBlock) Clone() *CodeBlock
- func (b *CodeBlock) Content() []byte
- func (b *CodeBlock) Cwd() string
- func (b *CodeBlock) ExcludeFromRunAll() bool
- func (b *CodeBlock) GetBlock() *CodeBlock
- func (b *CodeBlock) GetFile() string
- func (b *CodeBlock) GetFileRel() string
- func (b *CodeBlock) GetFrontmatter() Frontmatter
- func (b *CodeBlock) Interactive() bool
- func (b *CodeBlock) Interpreter() string
- func (b *CodeBlock) Intro() string
- func (b *CodeBlock) IsUnknown() bool
- func (b *CodeBlock) IsUnnamed() bool
- func (CodeBlock) Kind() BlockKind
- func (b *CodeBlock) Language() string
- func (b *CodeBlock) Lines() []string
- func (b *CodeBlock) Name() string
- func (b *CodeBlock) PromptEnv() bool
- func (b *CodeBlock) SetLine(p int, v string)
- func (b *CodeBlock) TextRange() (textRange TextRange)
- func (b *CodeBlock) Unwrap() ast.Node
- func (b *CodeBlock) Value() []byte
- type CodeBlocks
- type Document
- type Frontmatter
- type FrontmatterParseInfo
- type InnerBlock
- type MarkdownBlock
- type Node
- type ParsedSections
- type Renderer
- type TextRange
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDocumentParser = newFailoverAttributeParser(
[]attributeParser{
&babikMLParser{},
},
&babikMLParser{},
)
View Source
var FutureDocumentParser = newFailoverAttributeParser(
[]attributeParser{
&jsonParser{},
&babikMLParser{},
},
&jsonParser{},
)
todo(sebastian): make default in v2
Functions ¶
func CountFinalLineBreaks ¶ added in v1.2.3
func DetectLineBreak ¶ added in v1.2.3
func ParseFrontmatter ¶ added in v1.2.1
func ParseFrontmatter(raw string) (f Frontmatter, info FrontmatterParseInfo)
Types ¶
type Attributes ¶ added in v1.3.0
type CodeBlock ¶
type CodeBlock struct {
// contains filtered or unexported fields
}
func (*CodeBlock) Attributes ¶
func (*CodeBlock) Background ¶ added in v1.0.1
func (*CodeBlock) ExcludeFromRunAll ¶ added in v1.2.0
func (*CodeBlock) GetFileRel ¶ added in v1.2.1
func (*CodeBlock) GetFrontmatter ¶ added in v1.2.1
func (b *CodeBlock) GetFrontmatter() Frontmatter
func (*CodeBlock) Interactive ¶ added in v0.6.2
func (*CodeBlock) Interpreter ¶ added in v1.6.0
type CodeBlocks ¶
type CodeBlocks []*CodeBlock
func CollectCodeBlocks ¶ added in v0.4.0
func CollectCodeBlocks(node *Node) (result CodeBlocks)
func (CodeBlocks) Lookup ¶
func (b CodeBlocks) Lookup(name string) *CodeBlock
func (CodeBlocks) Names ¶
func (b CodeBlocks) Names() (result []string)
type Frontmatter ¶ added in v1.2.1
func (Frontmatter) ToParser ¶ added in v1.2.1
func (fmtr Frontmatter) ToParser() *parserv1.Frontmatter
type FrontmatterParseInfo ¶ added in v1.2.1
type FrontmatterParseInfo struct {
// contains filtered or unexported fields
}
func (FrontmatterParseInfo) Error ¶ added in v1.2.1
func (fpi FrontmatterParseInfo) Error() error
func (FrontmatterParseInfo) JSONError ¶ added in v1.2.1
func (fpi FrontmatterParseInfo) JSONError() error
func (FrontmatterParseInfo) TOMLError ¶ added in v1.2.1
func (fpi FrontmatterParseInfo) TOMLError() error
func (FrontmatterParseInfo) YAMLError ¶ added in v1.2.1
func (fpi FrontmatterParseInfo) YAMLError() error
type InnerBlock ¶ added in v0.4.0
type InnerBlock struct {
// contains filtered or unexported fields
}
InnerBlock represents a non-leaf block. It helps to handle nested fenced code blocks for block quotes and list items.
func (InnerBlock) Kind ¶ added in v0.4.0
func (InnerBlock) Kind() BlockKind
func (*InnerBlock) Unwrap ¶ added in v0.4.0
func (b *InnerBlock) Unwrap() ast.Node
func (*InnerBlock) Value ¶ added in v0.4.0
func (b *InnerBlock) Value() []byte
type MarkdownBlock ¶
type MarkdownBlock struct {
// contains filtered or unexported fields
}
func (MarkdownBlock) Kind ¶ added in v0.4.0
func (MarkdownBlock) Kind() BlockKind
func (*MarkdownBlock) Unwrap ¶ added in v0.4.0
func (b *MarkdownBlock) Unwrap() ast.Node
func (*MarkdownBlock) Value ¶ added in v0.4.0
func (b *MarkdownBlock) Value() []byte
type ParsedSections ¶ added in v0.4.1
func ParseSections ¶ added in v0.4.1
func ParseSections(source []byte) (result ParsedSections, _ error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.