mirror of https://sc.cryxtal.org/crystal/forgejo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
837 B
38 lines
837 B
// Copyright 2020 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package callout
|
|
|
|
import (
|
|
"github.com/yuin/goldmark/ast"
|
|
)
|
|
|
|
// Attention is an inline for an attention
|
|
type Attention struct {
|
|
ast.BaseInline
|
|
AttentionType string
|
|
}
|
|
|
|
// Dump implements Node.Dump.
|
|
func (n *Attention) Dump(source []byte, level int) {
|
|
m := map[string]string{}
|
|
m["AttentionType"] = n.AttentionType
|
|
ast.DumpHelper(n, source, level, m, nil)
|
|
}
|
|
|
|
// KindAttention is the NodeKind for Attention
|
|
var KindAttention = ast.NewNodeKind("Attention")
|
|
|
|
// Kind implements Node.Kind.
|
|
func (n *Attention) Kind() ast.NodeKind {
|
|
return KindAttention
|
|
}
|
|
|
|
// NewAttention returns a new Attention node.
|
|
func NewAttention(attentionType string) *Attention {
|
|
return &Attention{
|
|
BaseInline: ast.BaseInline{},
|
|
AttentionType: attentionType,
|
|
}
|
|
}
|