summaryrefslogtreecommitdiff
path: root/internal/glightbox/block.go
blob: e53e67bd1af72c2c4be41bff1aa59f6689d3d764 (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
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
}

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
}