openpeeps / tim

This is Tim ⚡️ A high-performance template engine & markup language written in Nim
https://openpeeps.github.io/tim/
GNU Lesser General Public License v3.0
51 stars 1 forks source link

allow objects/arrays inside attributes #8

Closed georgelemon closed 7 months ago

georgelemon commented 7 months ago

all these are valid and should be auto escaped

// objects
button data-attr={hello: "hey"}: "Clickable"

// arrays
button data-attr=["one", "two"]: "Clickable"

// from callables
var obj = {hello: "hey"}
button data-attr=$obj: "Should be fine"