Documentation ¶
Index ¶
Constants ¶
Variables ¶
View Source
var KindImg = ast.NewNodeKind("MediaSourceImage")
View Source
var KindMedia = ast.NewNodeKind("MediaParent")
View Source
var KindSource = ast.NewNodeKind("MediaSourceSource")
Functions ¶
Types ¶
type Extension ¶
type Extension struct {
Options
}
func WithDefaults ¶
func WithDefaults() Extension
func WithOptions ¶
type Media ¶
type Media struct { ast.BaseInline MediaType Type Alt string Link string }
Media represents an inline <video>, <audio> or <picture> node
type Options ¶
type Options struct { // MediaControls default is true, affects <audio> and <video> MediaControls bool // MediaAutoplay default is false, affects <audio> and <video> MediaAutoplay bool // MediaLoop default is false, affects <audio> and <video> MediaLoop bool // MediaMuted default is false, affects <audio> and <video> MediaMuted bool // MediaPreload default is empty string(""). Affects <audio> and <video> MediaPreload string }
type TagSourceImg ¶ added in v0.3.0
type TagSourceImg struct { ast.BaseInline Src string Alt string // contains filtered or unexported fields }
func (TagSourceImg) Dump ¶ added in v0.3.0
func (t TagSourceImg) Dump(source []byte, level int)
Dump implements ast.Node.Dump
func (TagSourceImg) GetSrc ¶ added in v0.3.1
func (t TagSourceImg) GetSrc() string
func (TagSourceImg) Kind ¶ added in v0.3.0
func (t TagSourceImg) Kind() ast.NodeKind
Kind implements ast.Node.Kind
func (*TagSourceImg) SetSrc ¶ added in v0.3.1
func (t *TagSourceImg) SetSrc(src string)
type TagSourceSource ¶ added in v0.3.0
type TagSourceSource struct { ast.BaseInline Src string // SrcSet is only used in <picture>s SrcSet string // contains filtered or unexported fields }
func (TagSourceSource) Dump ¶ added in v0.3.0
func (t TagSourceSource) Dump(source []byte, level int)
Dump implements ast.Node.Dump
func (TagSourceSource) GetSrc ¶ added in v0.3.1
func (t TagSourceSource) GetSrc() string
func (TagSourceSource) Kind ¶ added in v0.3.0
func (t TagSourceSource) Kind() ast.NodeKind
Kind implements ast.Node.Kind
func (*TagSourceSource) SetSrc ¶ added in v0.3.1
func (t *TagSourceSource) SetSrc(src string)
Click to show internal directories.
Click to hide internal directories.