go-html/render.go
Codex 0d361e537e
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
fix(html): restore full tree and stabilize nested layout block ids
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 03:11:36 +01:00

13 lines
307 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 node == nil {
return ""
}
if ctx == nil {
ctx = NewContext()
}
return node.Render(ctx)
}