Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClosingTag ¶
type ClosingTag struct {
// contains filtered or unexported fields
}
ClosingTag is a bbcode closing tag, i.e [/b].
func NewClosingTag ¶
func NewClosingTag(tok token.Token) *ClosingTag
NewClosingTag creates a new closing tag.
func (*ClosingTag) String ¶
func (ct *ClosingTag) String() string
String satisfies to the Node interface.
func (*ClosingTag) TagName ¶
func (ct *ClosingTag) TagName() string
TagName satisfies to the Node interface.
func (*ClosingTag) Token ¶
func (ct *ClosingTag) Token() token.Token
Token satisfies to the Node interface.
type Newline ¶
type Newline struct {
// contains filtered or unexported fields
}
Newline is a new line node.
type Node ¶
type Node interface { // Token returns a main token of the node. Token() token.Token // String returns a string representing of the node. String() string }
Node is the smallest piece of the parsing result.
type OpeningTag ¶
type OpeningTag struct {
// contains filtered or unexported fields
}
OpeningTag is a bbcode opening tag, i.e. [b]
func NewOpeningTag ¶
NewOpeningTag creates a new opening tag.
func (*OpeningTag) Attrs ¶
func (ot *OpeningTag) Attrs() map[string]string
Attrs returns a tag attributes.
func (*OpeningTag) String ¶
func (ot *OpeningTag) String() string
String satisfies to the Node interface.
func (*OpeningTag) TagName ¶
func (ot *OpeningTag) TagName() string
TagName satisfies to the Node interface.
func (*OpeningTag) Token ¶
func (ot *OpeningTag) Token() token.Token
Token satisfies to the Node interface.
func (*OpeningTag) Value ¶
func (ot *OpeningTag) Value() string
Value returns a bbcode tag value (string after =).
type SelfClosingTag ¶
type SelfClosingTag struct {
// contains filtered or unexported fields
}
SelfClosingTag is self-closing bbcode tag, i.e. [url="https://google.com" /]
func NewSelfClosingTag ¶
NewSelfClosingTag creates a new opening tag.
func (*SelfClosingTag) String ¶
func (ot *SelfClosingTag) String() string
String satisfies to the Node interface.
func (*SelfClosingTag) TagName ¶
func (ot *SelfClosingTag) TagName() string
TagName satisfies to the Node interface.
func (*SelfClosingTag) Token ¶
func (ot *SelfClosingTag) Token() token.Token
Token satisfies to the Node interface.
func (*SelfClosingTag) Value ¶
func (ot *SelfClosingTag) Value() string
Value returns a bbcode tag value (string after =).