mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
32 lines
764 B
Go
32 lines
764 B
Go
package ast
|
|
|
|
import (
|
|
gast "github.com/yuin/goldmark/ast"
|
|
)
|
|
|
|
// A TypographicText struct represents text that
|
|
// typographic text replaces certain punctuations.
|
|
type TypographicText struct {
|
|
gast.BaseInline
|
|
Value []byte
|
|
}
|
|
|
|
// Dump implements Node.Dump.
|
|
func (n *TypographicText) Dump(source []byte, level int) {
|
|
gast.DumpHelper(n, source, level, nil, nil)
|
|
}
|
|
|
|
// KindTypographicText is a NodeKind of the TypographicText node.
|
|
var KindTypographicText = gast.NewNodeKind("TypographicText")
|
|
|
|
// Kind implements Node.Kind.
|
|
func (n *TypographicText) Kind() gast.NodeKind {
|
|
return KindTypographicText
|
|
}
|
|
|
|
// NewTypographicText returns a new TypographicText node.
|
|
func NewTypographicText(value []byte) *TypographicText {
|
|
return &TypographicText{
|
|
Value: value,
|
|
}
|
|
}
|