Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBbToken ¶
One can insert use-case specific BBCode tags by using this function.
IMPORTANT: This is ignored by parser.Parse - you should use AddTokenClass instead! Only use this function if you plan on using parser.BbCodeParse()!
This will be deprecated in the future after BBCode functionality is added to AddMatcher.
Types ¶
type HtmlTags ¶
type HtmlTags struct { Options int // Compatibility options for BBCode until token parsing is complete Tags []string // HTML tags Classes [][]string // Classes to give to the HTML elements Attributes []map[int8]string // HTML tag attributes CssProps []map[int8]string // CSS Properties OutputFunc func([]string) string // A custom output function; this returns the string to emplace into the HTML. InputModFunc func(*[]string) // A function that takes input and returns input modified (an example use case would be converting a username to a user ID in @tagging) }
A type that determines what the parser will replace tags it finds with. The Attributes and CssProps are maps that assign a regexp parser group
Click to show internal directories.
Click to hide internal directories.