Commit Graph

7 Commits

Author SHA1 Message Date
b079bbffff fix: escape quotes in backtick strings and merge duplicate class attributes
- HTML-escape double quotes as " in backtick template literals for valid attribute values
- Merge shorthand classes (.alert) with class attribute values instead of emitting duplicates
- Handle string concatenation expressions in class attributes (e.g., class="btn btn-" + type)
2026-01-23 11:50:18 +05:30
3de712452c fix: support Angular-style attributes and object/array literals in compiled templates
Lexer changes:
- Support quoted attribute names: '(click)'='play()' or "(click)"="play()"
- Support parenthesized attribute names: (click)='play()' (Angular/Vue event bindings)

Build templates changes:
- Object literals for style attribute converted to CSS: {color: 'red'} -> color:red;
- Object literals for other attributes: extract values as space-separated
- Array literals converted to space-separated: ['foo', 'bar'] -> foo bar
2026-01-23 00:06:04 +05:30
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
e189abf30f fix: build template bug for same field names 2026-01-22 23:36:42 +05:30
66981d6908 fix: build template tag with json data issue. 2026-01-22 23:19:39 +05:30
d53ff24931 fix: template fn name fix for numeric named templates like 404.pug 2026-01-22 22:48:22 +05:30
654b45ee10 Compiled temapltes.
Benchmark cleanup
2026-01-22 11:10:47 +05:30