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