Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateHTML ¶
ValidateHTML performs comprehensive HTML validation including tag balance. This is the main entry point for template HTML validation.
func ValidateTagBalance ¶
ValidateTagBalance validates that all HTML tags are properly balanced. It uses a stack-based approach to ensure every opening tag has a matching closing tag and that they are properly nested.
Returns nil if the HTML is valid, otherwise returns an error describing the first structural issue found.
Types ¶
type Pongo2Renderer ¶
type Pongo2Renderer struct {
Debug bool
TemplateDir string
// contains filtered or unexported fields
}
Pongo2Renderer is a custom Gin renderer using Pongo2.
func NewPongo2Renderer ¶
func NewPongo2Renderer(templateDir string, debug bool) *Pongo2Renderer
NewPongo2Renderer creates a new Pongo2 renderer.
func (*Pongo2Renderer) HTML ¶
func (r *Pongo2Renderer) HTML(c *gin.Context, code int, name string, data interface{})
HTML renders an HTML template.
Click to show internal directories.
Click to hide internal directories.