diff options
Diffstat (limited to 'modules/markup/markdown/math/inline_block_node.go')
-rw-r--r-- | modules/markup/markdown/math/inline_block_node.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/markup/markdown/math/inline_block_node.go b/modules/markup/markdown/math/inline_block_node.go new file mode 100644 index 0000000..c92d0c8 --- /dev/null +++ b/modules/markup/markdown/math/inline_block_node.go @@ -0,0 +1,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{}, + } +} |