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
This commit is contained in:
2026-01-23 00:06:04 +05:30
parent e6a6c1d87f
commit 3de712452c
4 changed files with 358 additions and 3 deletions

View File

@@ -19,6 +19,14 @@ block content
"data": true
}
`)
br
div(class='div-class', (click)='play()') one
div(class='div-class' '(click)'='play()') two
a(style={color: 'red', background: 'green'}) sdfsdfs
a.button btn
br
form(method="post")
+input_text("firstName", "First Name", "first name")
br