Source File
block.go
Belonging Package
github.com/yuin/goldmark/ast
package ast
import (
textm
)
func ( *BaseBlock) () bool {
return .blankPreviousLines
}
func ( *BaseBlock) ( bool) {
.blankPreviousLines =
}
var KindDocument = NewNodeKind("Document")
func ( *Document) () NodeType {
return TypeDocument
}
func ( *Document) () NodeKind {
return KindDocument
}
var KindTextBlock = NewNodeKind("TextBlock")
func ( *TextBlock) () NodeKind {
return KindTextBlock
}
var KindParagraph = NewNodeKind("Paragraph")
func ( *Paragraph) () NodeKind {
return KindParagraph
}
type Heading struct {
var KindHeading = NewNodeKind("Heading")
func ( *Heading) () NodeKind {
return KindHeading
}
type ThematicBreak struct {
BaseBlock
}
func ( *ThematicBreak) ( []byte, int) {
DumpHelper(, , , nil, nil)
}
var KindThematicBreak = NewNodeKind("ThematicBreak")
func ( *ThematicBreak) () NodeKind {
return KindThematicBreak
}
func () *ThematicBreak {
return &ThematicBreak{
BaseBlock: BaseBlock{},
}
}
var KindCodeBlock = NewNodeKind("CodeBlock")
func ( *CodeBlock) () NodeKind {
return KindCodeBlock
}
type FencedCodeBlock struct {
func ( *FencedCodeBlock) () bool {
return true
}
var KindFencedCodeBlock = NewNodeKind("FencedCodeBlock")
func ( *FencedCodeBlock) () NodeKind {
return KindFencedCodeBlock
}
func ( *Text) *FencedCodeBlock {
return &FencedCodeBlock{
BaseBlock: BaseBlock{},
Info: ,
}
}
type Blockquote struct {
BaseBlock
}
func ( *Blockquote) ( []byte, int) {
DumpHelper(, , , nil, nil)
}
var KindBlockquote = NewNodeKind("Blockquote")
func ( *Blockquote) () NodeKind {
return KindBlockquote
}
func () *Blockquote {
return &Blockquote{
BaseBlock: BaseBlock{},
}
}
var KindList = NewNodeKind("List")
var KindListItem = NewNodeKind("ListItem")
func ( *ListItem) () NodeKind {
return KindListItem
}
type HTMLBlockType int
func ( *HTMLBlock) () bool {
return .ClosureLine.Start >= 0
}
func ( *HTMLBlock) ( []byte, int) {
:= strings.Repeat(" ", )
fmt.Printf("%s%s {\n", , "HTMLBlock")
:= strings.Repeat(" ", +1)
fmt.Printf("%sRawText: \"", )
for := 0; < .Lines().Len(); ++ {
:= .Lines().At()
fmt.Print(string([.Start:.Stop]))
}
fmt.Printf("\"\n")
for := .FirstChild(); != nil; = .NextSibling() {
.Dump(, +1)
}
if .HasClosure() {
:= .ClosureLine
fmt.Printf("%sClosure: \"%s\"\n", , string(.Value()))
}
fmt.Printf("%s}\n", )
}
var KindHTMLBlock = NewNodeKind("HTMLBlock")
func ( *HTMLBlock) () NodeKind {
return KindHTMLBlock
}
func ( HTMLBlockType) *HTMLBlock {
return &HTMLBlock{
BaseBlock: BaseBlock{},
HTMLBlockType: ,
ClosureLine: textm.NewSegment(-1, -1),
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |