cite

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(nodes ...node.Node) *element

New Creates a new cite element with the given child nodes. Example: cite.New(text.Text("Nineteen Eighty-Four")) Renders: <cite>Nineteen Eighty-Four</cite>

func RawText

func RawText(str string) *element

RawText Creates a new cite element with raw text content as unescaped HTML. Example: cite.RawText("<i>Nineteen Eighty-Four</i>") Renders: <cite><i>Nineteen Eighty-Four</i></cite>

func RawTextf

func RawTextf(format string, args ...any) *element

RawTextf Creates a new cite element with formatted raw text content as unescaped HTML using text.RawTextf. Example: cite.RawTextf("Hello <em>%s</em>", "World") Renders: <cite>Hello <em>World</em></cite>

func Static

func Static(str string) *element

Static Creates a new cite element with static text content. Example: cite.Static("Hello World") Renders: <cite>Hello World</cite>

func Text

func Text(str string) *element

Text Creates a new cite element with text content (HTML-encoded). Example: cite.Text("<i>Nineteen Eighty-Four</i>") Renders: <cite>&lt;i&gt;Nineteen Eighty-Four&lt;/i&gt;</cite>

func Textf

func Textf(format string, args ...any) *element

Textf Creates a new cite element with formatted text content using text.Textf. Example: cite.Textf("Hello %s", "World") Renders: <cite>Hello World</cite>

Types

type Element

type Element = element

Element is an exported alias for the private element type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL