Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New Creates a new code element with the given child nodes. Example: code.New(text.Text("console.log('Hello, World!');")) Renders: <code>console.log('Hello, World!');</code>
func RawText ¶
func RawText(str string) *element
RawText Creates a new code element with raw text content as unescaped HTML. Example: code.RawText("<span>console.log</span>('Hello');") Renders: <code><span>console.log</span>('Hello');</code>
func RawTextf ¶
RawTextf Creates a new code element with formatted raw text content as unescaped HTML using text.RawTextf. Example: code.RawTextf("Hello <em>%s</em>", "World") Renders: <code>Hello <em>World</em></code>
func Static ¶
func Static(str string) *element
Static Creates a new code element with static text content. Example: code.Static("Hello World") Renders: <code>Hello World</code>