go-html/render.go
Virgil ba384aeb12
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
fix: add nil-safe rendering paths
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 16:55:48 +00:00

12 lines
231 B
Go

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