Documentation ¶
Index ¶
- func FontColorHandler(tag Tag, content string) string
- func FontSizeHandler(tag Tag, content string) string
- func ListHandler(tag Tag, content string) string
- func SimpleHandler(tag Tag, content string) string
- func TextAlignHandler(tag Tag, content string) string
- func URLHandler(tag Tag, content string) string
- type Handler
- type Parser
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FontColorHandler ¶
FontColorHandler - parse color tag with color attribute
func FontSizeHandler ¶
FontSizeHandler - parse size tag with size attribute
func ListHandler ¶
ListHandler - parse list with one-line tags (double tags like [li] parsed separated)
func SimpleHandler ¶
SimpleHandler - handle tags that need just add html tags at the begin and the end
func TextAlignHandler ¶
func URLHandler ¶
URLHandler - parse url tag with or without attribute
Types ¶
type Parser ¶
type Parser struct { // Handlers - pairs with tagname - handler function Handlers map[string]Handler // SpecialChars - contains chars/strings that should be replaced SpecialChars map[string]string }
Parser - parse bbcode to html
func NewDefault ¶
func NewDefault() *Parser
NewDefault - return pointer on parser with all defaults tags and special chars
func (*Parser) AddSpecialString ¶
AddSpecialString - add string to be replaced with (if string already in parser - it will be override with new one)
Click to show internal directories.
Click to hide internal directories.