mayu-live / framework

Mayu is a live updating server-side component-based VDOM rendering framework written in Ruby
https://mayu.live
GNU Affero General Public License v3.0
135 stars 4 forks source link

Use Haml Object Reference syntax (`%div[key]`) for keys #45

Closed aalin closed 1 year ago

aalin commented 1 year ago

Instead of writing:

%ul
  = items.map do |item|
    %li{key: item.id}= item.title

It would be nice to write:

%ul
  = items.map do |item|
    %li[item.id]= item.title

https://haml.info/docs/yardoc/file.REFERENCE.html#object-reference-

Should be pretty easy to implement