Files
pugz/examples/demo/views/page-a.pug
Ankit Patial e6a6c1d87f fix: avoid variable shadowing in nested mixin calls with same parameter name
When a mixin calls another mixin passing a variable with the same name
as the parameter (e.g., +alert(message) where alert has param message),
skip generating redundant const declaration since the variable is already
in scope.

Also adds missing alert.pug mixin for demo project.
2026-01-22 23:49:01 +05:30

29 lines
496 B
Plaintext

extends layout.pug
block scripts
script(src='/jquery.js')
script(src='/pets.js')
block content
h1= title
p Welcome to the pets page!
ul
li Cat
li Dog
ul
each val in items
li= val
input(data-json=`
{
"very-long": "piece of ",
"data": true
}
`)
form(method="post")
+input_text("firstName", "First Name", "first name")
br
+input_text("lastName", "Last Name", "last name")
submit sumit
if error
+alert_error(error)