Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<i") TagClose = []byte("</i>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new italic element with optional child nodes. Example: i.New() Renders: <i></i>
func RawText ¶
func RawText(str string) *element
RawText Creates a new i element with raw text content. Uses text.RawText which is not HTML-escaped. Example: i.RawText("<cite>The Origin of Species</cite>") Renders: <i><cite>The Origin of Species</cite></i>
func RawTextf ¶
RawTextf Creates a new i element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: i.RawTextf("<cite>%s</cite>", headline) Renders: <i><cite>Breaking News</cite></i>
func Static ¶
func Static(str string) *element
Static Creates a new i element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: i.Static("et cetera") Renders: <i>et cetera</i>