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