Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<sup") TagClose = []byte("</sup>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new sup element with the given child nodes. Example: sup.New(text.Text("2")) Renders: <sup>2</sup>
func RawText ¶
func RawText(content string) *element
RawText Creates a new sup element with raw text content. Uses text.RawText which is not HTML-escaped. Example: sup.RawText("<a href=\"#fn1\">[1]</a>") Renders: <sup><a href="#fn1">[1]</a></sup>
func RawTextf ¶
RawTextf Creates a new sup element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: sup.RawTextf("<a href=\"#fn%d\">[%d]</a>", n, n) Renders: <sup><a href="#fn3">[3]</a></sup>
func Static ¶
func Static(content string) *element
Static Creates a new sup element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: sup.Static("TM") Renders: <sup>TM</sup>