summaryrefslogtreecommitdiffci
path: root/internal/glightbox/block.go
blob: 30cda1cb43bc5d34b93b49b2f863043f7190cf1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package glightbox

import (
	"time"

	"github.com/yuin/goldmark/ast"
)

// GLightboxBlock represents a light gallery block in the AST
type GLightboxBlock struct {
	ast.BaseBlock
	Images    []GLightboxImage
	Location  *time.Location
	Namespace string
}

type GLightboxImage struct {
	URL     string
	Tags    []string
	Caption []byte
}

var KindGLightboxBlock = ast.NewNodeKind("GLightboxBlock")

// Dump implements ast.Node.Dump
func (n *GLightboxBlock) Dump(source []byte, level int) {
	ast.DumpHelper(n, source, level, nil, nil)
}

// Kind implements ast.Node.Kind
func (n *GLightboxBlock) Kind() ast.NodeKind {
	return KindGLightboxBlock
}