summaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown/math/inline_block_node.go
blob: c92d0c8d84b606b64e03a2b8f6e7d8e4dcc8eaf7 (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
// Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

package math

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

// InlineBlock represents inline math e.g. $$...$$
type InlineBlock struct {
	Inline
}

// InlineBlock implements InlineBlock.
func (n *InlineBlock) InlineBlock() {}

// KindInlineBlock is the kind for math inline block
var KindInlineBlock = ast.NewNodeKind("MathInlineBlock")

// Kind returns KindInlineBlock
func (n *InlineBlock) Kind() ast.NodeKind {
	return KindInlineBlock
}

// NewInlineBlock creates a new ast math inline block node
func NewInlineBlock() *InlineBlock {
	return &InlineBlock{
		Inline{},
	}
}