custom_break

package
v1.0.1-0...-3379034 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KindCustomBreak = ast.NewNodeKind("CustomBreak")

KindCustomBreak is a NodeKind of the CustomBreak node.

Functions

func New

func New() *_CustomBreak

自定义分割线。

格式:

--- 内容 ---

TODO:改成 Paragraph Transformer。

func NewCustomBreakParser

func NewCustomBreakParser() parser.BlockParser

NewCustomBreakParser returns a new BlockParser that parses thematic breaks.

Types

type CustomBreak

type CustomBreak struct {
	ast.BaseBlock
	// contains filtered or unexported fields
}

A CustomBreak struct represents a thematic break of Markdown text.

func NewCustomBreak

func NewCustomBreak(content string) *CustomBreak

NewCustomBreak returns a new CustomBreak node.

func (*CustomBreak) Dump

func (n *CustomBreak) Dump(source []byte, level int)

Dump implements Node.Dump .

func (*CustomBreak) Kind

func (n *CustomBreak) Kind() ast.NodeKind

Kind implements Node.Kind.

type CustomBreakParser

type CustomBreakParser struct {
}

func (*CustomBreakParser) CanAcceptIndentedLine

func (b *CustomBreakParser) CanAcceptIndentedLine() bool

func (*CustomBreakParser) CanInterruptParagraph

func (b *CustomBreakParser) CanInterruptParagraph() bool

func (*CustomBreakParser) Close

func (b *CustomBreakParser) Close(node ast.Node, reader text.Reader, pc parser.Context)

func (*CustomBreakParser) Continue

func (b *CustomBreakParser) Continue(node ast.Node, reader text.Reader, pc parser.Context) parser.State

func (*CustomBreakParser) Open

func (b *CustomBreakParser) Open(parent ast.Node, reader text.Reader, pc parser.Context) (ast.Node, parser.State)

func (*CustomBreakParser) Trigger

func (b *CustomBreakParser) Trigger() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL