templ
templ copied to clipboard
Spread under attribute
There is a case where you might want to have a spread on an attribute. Example:
<button class={ []string{"foo"}... }>Button</button>
This error comes in if i use this:
missing ',' in composite literal
If I generate like this instead:
<button class={ []string{"foo"}[0] }>Button</button>
Creates:
var templ_7745c5c3_Var2 = []any{[]string{"foo"}[0]}
Looking at the generation, it seems that supporting spread operator shouldn't be a problem. Some kind of parsing issue?!