Documentation
¶
Overview ¶
Package bbcode renders BBCode input as safe HTML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds the tag definitions used during a Parse or Render call.
A fresh configuration is created for every call, so options cannot affect unrelated renders.
func NewConfig ¶
func NewConfig() *Config
NewConfig returns an independent configuration with the built-in tags.
func (*Config) AddTag ¶
func (config *Config) AddTag(definition TagDefinition)
AddTag adds or replaces a tag definition. Names are normalized to lower case.
type Node ¶
type Node interface {
// contains filtered or unexported methods
}
Node is an element in a parsed BBCode document.
type Option ¶
type Option func(*Config)
Option changes the tag configuration used for one Parse or Render call.
func WithTag ¶
func WithTag(definition TagDefinition) Option
WithTag adds or replaces one tag definition for a Parse or Render call.
type Root ¶
type Root struct {
Children []Node
}
Root is the top-level node of a parsed BBCode document.
Click to show internal directories.
Click to hide internal directories.