Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<rp") TagClose = []byte("</rp>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new rp element with optional child nodes. Example: rp.New(text.Text("(")) Renders: <rp>(</rp>
func RawText ¶
func RawText(content string) *element
RawText Creates a new rp element with raw text content. Uses text.RawText which is not HTML-escaped. Example: rp.RawText("<span>(</span>") Renders: <rp><span>(</span></rp>
func RawTextf ¶
RawTextf Creates a new rp element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: rp.RawTextf("<span>%s</span>", bracket) Renders: <rp><span>(</span></rp>
func Static ¶
func Static(content string) *element
Static Creates a new rp element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: rp.Static(")") Renders: <rp>)</rp>