Documentation ¶
Overview ¶
Package html implements expanders based on the special makers recognized by Cherry. --
- Copyright (C) 2015 by Rafael Santiago *
- This is a free software. You can redistribute it and/or modify under
- the terms of the GNU General Public License version 2. *
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBadAssErrorData ¶
func GetBadAssErrorData() string
GetBadAssErrorData spits the default 404 Cherry's document.
Types ¶
type Preprocessor ¶
type Preprocessor struct {
// contains filtered or unexported fields
}
Preprocessor is returned by NewHTMLPreprocessor and it actually performs the content expansion.
func NewHTMLPreprocessor ¶
func NewHTMLPreprocessor(rooms *config.CherryRooms) *Preprocessor
NewHTMLPreprocessor creates a new HTML preprocessor.
func (*Preprocessor) ExpandData ¶
func (p *Preprocessor) ExpandData(roomName, data string) string
ExpandData gives preference for statical data if it does not exist the data is processed by expanders.
func (*Preprocessor) Init ¶
func (p *Preprocessor) Init(rooms *config.CherryRooms)
Init sets all default expanders.
func (*Preprocessor) SetDataValue ¶
func (p *Preprocessor) SetDataValue(field, data string)
SetDataValue sets a statical content for a special marker.
func (*Preprocessor) UnsetDataValue ¶
func (p *Preprocessor) UnsetDataValue(field string)
UnsetDataValue removes a previous data set by SetDataValue.
Click to show internal directories.
Click to hide internal directories.