Documentation
¶
Index ¶
- Variables
- func ASTTWalk(n ast.Node, walker ASTTWalker) error
- func NewEmbed(opts ...EmbedOption) goldmark.Extender
- func NewEmbedTransformer(opts ...EmbedOption) parser.ASTTransformer
- func NewHTMLRenderer() renderer.NodeRenderer
- type ASTTWalker
- type AudioOptions
- type EmbedConfig
- type EmbedOption
- type HTMLRenderer
- type IframeOptions
- type NoExtPattern
- type NodeAudio
- type NodeIframe
- type NodeVideo
- type UrlPattern
- type VideoOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var KindAudio = ast.NewNodeKind("Audio")
View Source
var KindIframe = ast.NewNodeKind("Iframe")
View Source
var KindVideo = ast.NewNodeKind("Video")
Functions ¶
func NewEmbed ¶
func NewEmbed(opts ...EmbedOption) goldmark.Extender
func NewEmbedTransformer ¶
func NewEmbedTransformer(opts ...EmbedOption) parser.ASTTransformer
func NewHTMLRenderer ¶
func NewHTMLRenderer() renderer.NodeRenderer
Types ¶
type ASTTWalker ¶
type ASTTWalker func(n ast.Node) (ast.WalkStatus, error)
type AudioOptions ¶
type EmbedConfig ¶
type EmbedConfig struct { AudioExt map[string]struct{} VideoExt map[string]struct{} Host2Audio map[string][]*NoExtPattern Host2Video map[string][]*NoExtPattern Host2Iframe map[string][]*UrlPattern }
type EmbedOption ¶
type EmbedOption interface {
SetEmbedOption(*EmbedConfig)
}
func WithEmbedAudioExt ¶
func WithEmbedAudioExt(exts []string) EmbedOption
func WithEmbedAudioUrl ¶
func WithEmbedAudioUrl(ops []AudioOptions) EmbedOption
func WithEmbedIframeUrl ¶
func WithEmbedIframeUrl(ops []IframeOptions) EmbedOption
func WithEmbedVideoExt ¶
func WithEmbedVideoExt(exts []string) EmbedOption
func WithEmbedVideoUrl ¶
func WithEmbedVideoUrl(ops []VideoOptions) EmbedOption
type HTMLRenderer ¶
type HTMLRenderer struct{}
func (*HTMLRenderer) RegisterFuncs ¶
func (r *HTMLRenderer) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer)
type IframeOptions ¶
type NodeIframe ¶
func (*NodeIframe) Kind ¶
func (n *NodeIframe) Kind() ast.NodeKind
Click to show internal directories.
Click to hide internal directories.