extension

package
v0.0.0-...-92ffc6e Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPriority = 8999

Functions

func NewRawBlockHTMLRenderer

func NewRawBlockHTMLRenderer(option RawOption) renderer.NodeRenderer

func NewRawBlockParser

func NewRawBlockParser(option RawOption) parser.BlockParser

func NewRawExtension

func NewRawExtension(option RawOption) goldmark.Extender

func NewRawInlineHTMLRenderer

func NewRawInlineHTMLRenderer(option RawOption) renderer.NodeRenderer

func NewRawInlineParser

func NewRawInlineParser(option RawOption) parser.InlineParser

Types

type RawBlock

type RawBlock struct {
	Option RawOption
}

func (*RawBlock) Extend

func (e *RawBlock) Extend(m goldmark.Markdown)

type RawBlockHTMLRenderer

type RawBlockHTMLRenderer struct {
	html.Config
	Option RawOption
}

func (*RawBlockHTMLRenderer) RegisterFuncs

type RawBlockParser

type RawBlockParser struct {
	Option RawOption
}

func (*RawBlockParser) CanAcceptIndentedLine

func (s *RawBlockParser) CanAcceptIndentedLine() bool

func (*RawBlockParser) CanInterruptParagraph

func (s *RawBlockParser) CanInterruptParagraph() bool

func (*RawBlockParser) Close

func (s *RawBlockParser) Close(_ ast.Node, _ text.Reader, _ parser.Context)

func (*RawBlockParser) Continue

func (s *RawBlockParser) Continue(
	node ast.Node,
	reader text.Reader,
	_ parser.Context,
) parser.State

func (*RawBlockParser) Open

func (s *RawBlockParser) Open(
	_ ast.Node,
	reader text.Reader,
	_ parser.Context,
) (ast.Node, parser.State)

func (*RawBlockParser) Trigger

func (s *RawBlockParser) Trigger() []byte

type RawInline

type RawInline struct {
	Option RawOption
}

func (*RawInline) Extend

func (e *RawInline) Extend(m goldmark.Markdown)

type RawInlineHTMLRenderer

type RawInlineHTMLRenderer struct {
	html.Config
	Option RawOption
}

func (*RawInlineHTMLRenderer) RegisterFuncs

type RawInlineParser

type RawInlineParser struct {
	Option RawOption
}

func (*RawInlineParser) Parse

func (r *RawInlineParser) Parse(_ ast.Node, reader text.Reader, _ parser.Context) ast.Node

func (*RawInlineParser) Trigger

func (r *RawInlineParser) Trigger() []byte

type RawOption

type RawOption struct {
	IsBlock               bool   `json:"is_block"`                 // 是否为块级
	Tag                   string `json:"tag"`                      // 捕捉后生成的 html 标签
	ClassName             string `json:"class_name"`               // 生成的标签的 class 值
	Inner                 string `json:"inner"`                    // 生成的标签的内嵌属性例如 title="11"
	KeepMark              bool   `json:"keep_mark"`                // 是否保留匹配用标识
	PrefixMark            string `json:"prefix_mark"`              // 开头匹配
	SuffixMark            string `json:"suffix_mark"`              // 结尾匹配
	Trigger               string `json:"trigger"`                  // 触发字节
	ParserPriority        *int   `json:"parser_priority"`          // 注册的解析器优先级
	RendererPriority      *int   `json:"renderer_priority"`        // 注册的渲染器优先级
	CanInterruptParagraph bool   `json:"can_interrupt_paragraph"`  // 块级解析器是否可以中断段落
	CanAcceptIndentedLine bool   `json:"can_accept_indented_line"` // 块级解析器是否可以渲染缩进线
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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