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