go-html/render.go
Virgil 3616ad3a76 chore: polish ax v0.8.0 conventions
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 18:12:06 +00:00

10 lines
274 B
Go

package html
// Render is a convenience function that renders a node tree to HTML.
// Usage example: html := Render(El("main", Text("welcome")), NewContext())
func Render(node Node, ctx *Context) string {
if ctx == nil {
ctx = NewContext()
}
return node.Render(ctx)
}