Documentation
¶
Overview ¶
Simple, Elegant yet Extendible Syntax System. (p:Hello World in Paragraph!)
Index ¶
- Variables
- func A(li *Lispy) string
- func ANoFollow(li *Lispy) string
- func Area(li *Lispy) string
- func AreaNoFollow(li *Lispy) string
- func Audio(li *Lispy) string
- func Blanks(li *Lispy) string
- func Br(li *Lispy) string
- func Button(li *Lispy) string
- func CSS(li *Lispy) string
- func Canvas(li *Lispy) string
- func Common(li *Lispy) string
- func CommonCite(li *Lispy) string
- func CommonCiteDateTime(li *Lispy) string
- func CommonDir(li *Lispy) string
- func CommonName(li *Lispy) string
- func CommonSpan(li *Lispy) string
- func CommonSrc(li *Lispy) string
- func CommonTitle(li *Lispy) string
- func CommonValue(li *Lispy) string
- func Details(li *Lispy) string
- func Embed(li *Lispy) string
- func Escape(li *Lispy) string
- func EscapedHtml(li *Lispy) string
- func FieldSet(li *Lispy) string
- func Form(li *Lispy) string
- func Header(li *Lispy) string
- func HtmlAmp(li *Lispy) string
- func Img(li *Lispy) string
- func Input(li *Lispy) string
- func JavaScript(li *Lispy) string
- func Keygen(li *Lispy) string
- func Label(li *Lispy) string
- func Object(li *Lispy) string
- func Ol(li *Lispy) string
- func Option(li *Lispy) string
- func Output(li *Lispy) string
- func Param(li *Lispy) string
- func Raw(li *Lispy) string
- func ScriptFile(li *Lispy) string
- func Select(li *Lispy) string
- func Source(li *Lispy) string
- func Table(li *Lispy) string
- func TableTd(li *Lispy) string
- func Textarea(li *Lispy) string
- func Time(li *Lispy) string
- func Track(li *Lispy) string
- func Video(li *Lispy) string
- func Wbr(li *Lispy) string
- type Lispy
- func (li *Lispy) AddFuncMap(lispymap LispyMap) *Lispy
- func (li *Lispy) AddHandlerMap(lispyhandlermap LispyHandlerMap) *Lispy
- func (li *Lispy) AllowTags(names ...string)
- func (li *Lispy) ContentAsInt64() int64
- func (li *Lispy) Copy() *Lispy
- func (li *Lispy) Delete(name string)
- func (li *Lispy) Exist(name string) bool
- func (li *Lispy) ExistDel(name string) bool
- func (li *Lispy) ExistRes(name string) bool
- func (li *Lispy) Get(name string) string
- func (li *Lispy) GetDel(name string) string
- func (li *Lispy) GetInt(name string) int
- func (li *Lispy) GetInt64(name string) int64
- func (li *Lispy) GetInt64Del(name string) int64
- func (li *Lispy) GetIntDel(name string) int
- func (li *Lispy) GetNames() []string
- func (li *Lispy) GetParam() string
- func (li *Lispy) GetRaw(name string) string
- func (li *Lispy) GetRawDel(name string) string
- func (li *Lispy) ParseParam()
- func (li *Lispy) RawContent() string
- func (li *Lispy) RawContentExt() string
- func (li *Lispy) Render(str string) string
- func (li *Lispy) RenderSafe(str string) html.HTML
- func (li *Lispy) RenderedContent() html.HTML
- func (li *Lispy) RestrictAttribute()
- func (li *Lispy) RestrictParam()
- func (li *Lispy) Safe(str string) html.HTML
- func (li *Lispy) Set(name, value string)
- func (li *Lispy) SetFunc(name string, function LispyFunc) *Lispy
- func (li *Lispy) SetHandler(name string, lispyhandler LispyHandler) *Lispy
- type LispyFunc
- type LispyHandler
- type LispyHandlerMap
- type LispyMap
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMap = struct { sync.RWMutex Map LispyHandlerMap }{ Map: LispyHandlerMap{ "--": LispyFunc(Blanks), "_": LispyFunc(Escape), "_html": LispyFunc(EscapedHtml), "a": LispyFunc(A), "abbr": LispyFunc(CommonTitle), "address": LispyFunc(Common), "area": LispyFunc(Area), "article": LispyFunc(Common), "aside": LispyFunc(Common), "audio": LispyFunc(Audio), "b": LispyFunc(Common), "bdi": LispyFunc(Common), "bdo": LispyFunc(CommonDir), "blockquote": LispyFunc(CommonCite), "br": LispyFunc(Br), "button": LispyFunc(Button), "c": LispyFunc(HtmlAmp), "canvas": LispyFunc(Canvas), "caption": LispyFunc(Common), "cite": LispyFunc(Common), "code": LispyFunc(Common), "col": LispyFunc(CommonSpan), "colgroup": LispyFunc(CommonSpan), "css": LispyFunc(CSS), "datalist": LispyFunc(Common), "dd": LispyFunc(Common), "del": LispyFunc(CommonCiteDateTime), "details": LispyFunc(Details), "dfn": LispyFunc(Common), "div": LispyFunc(Common), "dl": LispyFunc(Common), "dt": LispyFunc(Common), "em": LispyFunc(Common), "embed": LispyFunc(Embed), "fieldset": LispyFunc(FieldSet), "figcaption": LispyFunc(Common), "figure": LispyFunc(Common), "footer": LispyFunc(Common), "form": LispyFunc(Form), "h1": LispyFunc(Header), "h2": LispyFunc(Header), "h3": LispyFunc(Header), "h4": LispyFunc(Header), "h5": LispyFunc(Header), "h6": LispyFunc(Header), "header": LispyFunc(Common), "hgroup": LispyFunc(Common), "hr": LispyFunc(Common), "i": LispyFunc(Common), "iframe": LispyFunc(CommonSrc), "img": LispyFunc(Img), "input": LispyFunc(Input), "ins": LispyFunc(CommonCiteDateTime), "javascript": LispyFunc(JavaScript), "kbd": LispyFunc(Common), "keygen": LispyFunc(Keygen), "label": LispyFunc(Label), "legend": LispyFunc(Common), "li": LispyFunc(CommonValue), "map": LispyFunc(CommonName), "mark": LispyFunc(Common), "nav": LispyFunc(Common), "object": LispyFunc(Object), "ol": LispyFunc(Ol), "option": LispyFunc(Option), "output": LispyFunc(Output), "p": LispyFunc(Common), "param": LispyFunc(Param), "pre": LispyFunc(Common), "q": LispyFunc(CommonCite), "raw": LispyFunc(Raw), "rp": LispyFunc(Common), "rt": LispyFunc(Common), "ruby": LispyFunc(Common), "s": LispyFunc(Common), "samp": LispyFunc(Common), "scriptfile": LispyFunc(ScriptFile), "section": LispyFunc(Common), "select": LispyFunc(Select), "small": LispyFunc(Common), "source": LispyFunc(Source), "span": LispyFunc(Common), "strong": LispyFunc(Common), "style": LispyFunc(CSS), "sub": LispyFunc(Common), "sup": LispyFunc(Common), "table": LispyFunc(Table), "tbody": LispyFunc(Common), "td": LispyFunc(TableTd), "textarea": LispyFunc(Textarea), "tfood": LispyFunc(Common), "th": LispyFunc(TableTd), "thead": LispyFunc(Common), "time": LispyFunc(Time), "tr": LispyFunc(Common), "track": LispyFunc(Track), "u": LispyFunc(Common), "ul": LispyFunc(Common), "var": LispyFunc(Common), "video": LispyFunc(Video), "wbr": LispyFunc(Wbr), }, }
Functions ¶
func AreaNoFollow ¶
func CommonCite ¶
func CommonCiteDateTime ¶
func CommonName ¶
func CommonSpan ¶
func CommonTitle ¶
func CommonValue ¶
func EscapedHtml ¶
func JavaScript ¶
func ScriptFile ¶
Types ¶
type Lispy ¶
type Lispy struct { sync.RWMutex Name string Content string CacheName string // contains filtered or unexported fields }
Lispy Structure
func (*Lispy) AddHandlerMap ¶
func (li *Lispy) AddHandlerMap(lispyhandlermap LispyHandlerMap) *Lispy
Add Handler Map
func (*Lispy) AllowTags ¶
Specify Allowed Tags, useful for comment system.
Note: All tags are enabled by default.
func (*Lispy) ContentAsInt64 ¶
Get Content as Int64, return 0 on fail!
func (*Lispy) GetInt64Del ¶
func (*Lispy) GetNames ¶
Get Names of Parameter/Attribute.
Note: Does not operate while Parameter/Attribute has been Restricted.
func (*Lispy) ParseParam ¶
func (li *Lispy) ParseParam()
func (*Lispy) RawContentExt ¶
Unescaped Content Extended, includes | : ( )
func (*Lispy) RenderSafe ¶
Alais of Render, but marks the string as safe!
func (*Lispy) RenderedContent ¶
func (*Lispy) RestrictAttribute ¶
func (li *Lispy) RestrictAttribute()
Restrict Attribute, useful for comment system.
Note: Alias of RestrictParam
func (*Lispy) RestrictParam ¶
func (li *Lispy) RestrictParam()
Restrict Parameter, useful for comment system.
func (*Lispy) SetHandler ¶
func (li *Lispy) SetHandler(name string, lispyhandler LispyHandler) *Lispy
Set Handler
Click to show internal directories.
Click to hide internal directories.