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